ndisasm sometimes outputs addresses plus 0x100000000 on amd64

Bug #51374 reported by Nico R.
2
Affects Status Importance Assigned to Milestone
NASM
Unknown
Unknown
nasm (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: nasm

I'm using nasm-0.98.38-1.2 on Dapper on amd64. Here is a small test program to show a problem in ndisasm:

; test.asm:
bits 32
org 0xefb58
call 0xef980

Assemble with:
nasm -o test.bin test.asm

Then, disassemble with ndisasm:
ndisasm -b 32 -i -o 0xefb58 test.bin

Result:
000EFB58 E823FEFFFF call 0x1000ef980

Expected result:
000EFB58 E823FEFFFF call 0xef980

This seems to happen with relative calls to lower memory addresses (negative values).

IIRC, this works on i386 architectures, so I suppose that the ndisasm code expects an overflow of a variable at 0x100000000, but that is not true on 64-bit architectures.

Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

Thank you for your bug report. Do you still have this issue with the latest release of Ubuntu ?

Changed in nasm:
importance: Undecided → Medium
status: Unconfirmed → Needs Info
Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

Any this on this ?

Revision history for this message
Nico R. (n-roeser) wrote :

As I don’t have a 64-bit box at hand, someone else will have to test this (thanks), or it will take some time.

Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

Ok, I found some people on irc who can confirm that under Feisty. It doesn't happe with i386.

Changed in nasm:
status: Incomplete → Confirmed
Changed in nasm:
status: Confirmed → Triaged
Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

This should be fixed in nasm 0.99 but it's not in our repos...

Changed in nasm:
status: Triaged → Fix Committed
Revision history for this message
Wouter Stomp (wouterstomp-deactivatedaccount) wrote :

Fixed: hardy has 0.99.06-2

Changed in nasm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.