[m-rev.] diff: fix failure of general/read_line_as_string in .profdeep grades

Ralph Becket rafe at cs.mu.OZ.AU
Wed Jun 15 00:51:36 AEST 2005


Julien Fischer, Tuesday, 14 June 2005:
> 
> Estimated hours taken: 9
> Branches: main, release
> 
> runtime/mercury_deep_profiling.c:
> 	Fix a bug that causes general/read_line_as_string to seg fault
> 	in the .profdeep grades.  The problem was that the slots in the hash
> 	tables were not being initialised to NULL.
> 
> 	The above test case triggered this problem because the start of
> 	the MR_call_site_dynamic_table was reusing memory that
> 	io.read_line_as_string_2/6 had previously used as a temporary buffer.
> 	Consequently, the initial values of many of the slots in the hash table
> 	contained rubbish; moreover they contained inaccessible rubbish which
> 	was the code that writes out the Deep.data files was seg faulting.

Nice one - that must have been a cow to track down.

And the patch looks fine to me.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list