Ticket #98 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Use of StructName_size for reserving space in another struct is broken.

Reported by: bird-yasm-spam Assigned to: peter@tortall.net
Priority: P1 Milestone: 0.6.0
Component: Core Version: other
Severity: blocker Keywords:
Cc:

Description

The following doesn't work with current subversion (r1749):

struc TST1
    .a resd 2
endstruc

struc TST2
    .b resb TST1_size
endstruc

The example works fine when fed to nasm, yasm 0.4.0 and yasm r1365.

Attachments

Change History

02/02/07 00:11:43 changed by bird-yasm-spam

Tracked it down to changeset [1598]. Unfortunately that's a rather big changeset so I'm a bit lost...

02/02/07 15:46:13 changed by peter

  • owner set to peter@tortall.net.
  • status changed from new to assigned.

Whoops. Yeah, there's an explicit comment in bc-reserve.c saying FIXME regarding this. I'll look into fixing it.

02/03/07 16:41:42 changed by peter

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [1753]) Fix #98. Fix implemented by merging any reserve multiple into the main bytecode multiple.

strucsize.asm tests both creation and instantiation of a nested structure. [1751] and [1752] fix bugs found during the testing of the instantiation portion of this testcase.

A side effect of this change is that some errors are found in different phases, and the error messages are slightly different. Split reserve-error.asm testcase into two parts to still get full coverage.

02/05/07 16:58:07 changed by bird-yasm-spam

Thanks for fixing the problem so quickly! I've given it a quick run here and our code compiles just fine now.


Add/Change #98 (Use of StructName_size for reserving space in another struct is broken.)