#96 ✓resolved
Peter Johnson

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

Reported by Peter Johnson | June 25th, 2011 @ 07:50 PM | in 0.6.0 (closed)

Originally posted on Trac by bird-yasm-spam@anduin.net
Original Trac Ticket

  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.

Trac Attachments

h3. Trac Comments
comment:1

              Changed 4 years ago by bird-yasm-spam@anduin.net


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

comment:2

              Changed 4 years ago by peter@tortall.net


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

      comment:2

                  Changed 4 years ago by peter@tortall.net

      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.

      Owner
        set to peter@tortall.net
    
      Status
        changed from new to assigned

comment:3

              Changed 4 years ago by peter


(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.

      comment:3

                  Changed 4 years ago 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.

      Status
        changed from assigned to closed
    
      Resolution
        set to fixed

comment:4

              Changed 4 years ago by bird-yasm-spam@anduin.net


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

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Yasm Modular Assembler Project

Shared Ticket Bins

People watching this ticket

Tags

Pages