google / szl

A compiler and runtime for the Sawzall language
Other
69 stars 16 forks source link

NDEBUG assert -- lt-szl: engine/nativesupport.cc:1372: static void sawzall::NSupport::AllocStatics(sawzall::Proc*, size_t): Assertion `proc->state_.sp_ == proc->state_.fp_->stack()' failed. #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When szl is built with NDEBUG, it asserts:

lt-szl: engine/nativesupport.cc:1372: static void 
sawzall::NSupport::AllocStatics(sawzall::Proc*, size_t): Assertion 
`proc->state_.sp_ == proc->state_.fp_->stack()' failed.

e.g.:

$ src/szl -e 'emit stdout <- "Hello";'
(assertion)
Aborted

Original issue reported on code.google.com by dbh@google.com on 15 Nov 2010 at 2:00

GoogleCodeExporter commented 9 years ago
This was caused by Frame's extensive use of type punning that breaks strict 
aliasing rules.  The fmt library also has some similar problems (see issue 11). 
 In r42, I added the -fno-strict-aliasing flag for the entire compile, although 
this is a very blunt solution.  At some point hopefully the use of 
-fno-strict-aliasing can be narrowed to a few specific files (or, ideally, 
eliminated).

Original comment by dbh@google.com on 19 Nov 2010 at 5:23

GoogleCodeExporter commented 9 years ago

Original comment by dbh@google.com on 25 Nov 2010 at 6:52