Faculty of Information Technology
Software Engineering Group

Opened 6 years ago

Closed 5 years ago

#171 closed defect (fixed)

Fix crash in Smalltalk >> #keys

Reported by: Jan Vrany Owned by:
Priority: critical Milestone: 8.0.0
Component: default Keywords:
Cc: Also affects CVS HEAD (eXept version): no


...introduced by commit a68e1e09f73a/stx.libbasic.

The crash is (probably) caused by memory overwrite, the on-stack context for Smalltalk >> #keys is overwritten with rubbish, causing creation of a block that is then passed to Smalltalk >> #keysDo: to crash hard. The context is all right right after the Smalltalk >> #size finishes.

One way to debug it would be to run in under Valgrind simlator and then in GDB watch the whole memory range where the on-stack context sits. See Debugging your program using Valgrind gdbserver and GDB

Change History (1)

comment:1 Changed 5 years ago by Jan Vrany

Resolution: fixed
Status: newclosed

The crash was caused by using plain C return from a
primitive code that had a full Smalltalk context. Naturally,
the return did not cleaned up the context, therefore the crash.

Fixed in 0cdcdf123327/stx.libbasic

Note: See TracTickets for help on using tickets.