mystery refcount problem with -ssaiv
|Created on||Feb 02, 2009 23:38|
|Resolved on||Feb 03, 2009 16:13|
Created an attachment (id=500) source code to reproduce failure If I compile the attached this way with build #15987: sac2c -noprelude -ssaiv bugxxx.sac I get a segfault at run time. If I compile it without -ssaiv, it works fine. The interesting thing is that a break at -b11 and -b12 show only minor differences between the resulting codes, and they look to be just variable name differences. However, a break at -b14 shows that there are some slight differences in reference counts in the generated code, such as this: 153,154c154,156 < _emal_522__isaa_387__rso_16_TheWorld = _alloc_( 1, 0, [:int]); < _isaa_387__rso_16_TheWorld = _fill_( 0, _emal_522__isaa_387__rso_16_TheWorld); --- > _inc_rc_( _wlidx_513_z, 1); > _emal_530__isaa_395__rso_16_TheWorld = _alloc_( 1, 0, [:int]); > _isaa_395__rso_16_TheWorld = _fill_( 0, _emal_530__isaa_395__rso_16_TheWorld); This sort of problem would explain the segfault. I am guessing that the -bxx code fails to include ALL semantic information about the program under compilation, and that is why there is no visible difference between the two codes with -bxx. Perhaps it should include that information!
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information