[mercury-users] hash_table module bug?

Peter Ross peter.ross at miscrit.be
Fri Sep 7 02:04:43 AEST 2001


On Thu, Sep 06, 2001 at 05:15:02PM +0200, Dominique de Waleffe wrote:
> The  small program below fails for me with the following output:
> [168]>./xx
> > some values
> > create a table
> > initialise its contents
> Mercury runtime: array__set: array index out of bounds
> 
> Have I done anything wrong?
> 
No, it is a bug in hash_table.

Currently det_insert doesn't check to see whether or not the hash table
has been initialised yet like hash_table__set does.

The work around would be to call hash_table__set for the first element,
and then det_insert for the rest.

Pete
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list