Opened 11 years ago

Last modified 11 years ago

#108 new defect

Assertion in CreateThread (KERNEL32)

Reported by: dmik Owned by:
Priority: major Milestone: general enhancement
Component: odin Version: 0.8.9
Severity: medium Keywords:
Cc:

Description

The debug build of Odin hits a debug assertion at #143 in hmthread.cpp (http://trac.netlabs.org/odin32/browser/trunk/src/kernel32/hmthread.cpp?rev=22066#L143) when running with the recent Flash under FF 17.

This needs to be investigated as it may be a source of some crashes we experience in the release builds, like this one: http://svn.ecomstation.nl/flash10/ticket/98 (just a guess).

Change History (1)

comment:1 by dmik, 11 years ago

I investigated the code, nothing suspicious. I tried also to add more debug logging but this leads to a situation where it doesn't crash anymore (of course!).

The only idea that comes to my mind is memory corruption (or some race). The TEB structure is allocated and added to the list in the Win32Thread constructor. The list is then walked with GetTEBFromThreadHandle so if the constructor (and the following checks) succeeds (in our crashing case - they do otherwise it would return early), then TEB was successfully allocated and added to the list. So if the following lookup fails then the new TEB was either already removed from the list (by a thread that ended too fast?) or there is a memory corruption.

I will leave it open for now in case if it pops up again.

Note: See TracTickets for help on using tickets.