[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#136525: marked as done (nasm generates incorrect addresses in certain circumstancesw)



Your message dated Wed, 17 Apr 2002 07:32:10 -0400
with message-id <E16xnfW-0005re-00@auric.debian.org>
and subject line Bug#136525: fixed in nasm 0.98.28bf-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 3 Mar 2002 02:34:57 +0000
>From tom@acropolis.ucam.org Sat Mar 02 20:34:57 2002
Return-path: <tom@acropolis.ucam.org>
Received: from mauve.csi.cam.ac.uk [131.111.8.38] (exim)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 16hLpx-0003BJ-00; Sat, 02 Mar 2002 20:34:57 -0600
Received: from tal26.joh.cam.ac.uk ([131.111.237.142] helo=theseus.acropolis.ucam.org)
	by mauve.csi.cam.ac.uk with esmtp (Exim 3.34 #1)
	id 16hLpv-0002YS-00; Sun, 03 Mar 2002 02:34:55 +0000
Received: from [131.111.237.172] (helo=tal26a.joh.cam.ac.uk)
	by theseus.acropolis.ucam.org with smtp (Exim 3.34 #1 (Debian))
	id 16hLpq-0004zS-00; Sun, 03 Mar 2002 02:34:50 +0000
Received: by tal26a.joh.cam.ac.uk (sSMTP sendmail emulation); Sun, 3 Mar 2002 02:34:58 +0000
From: "Tom Lees" <tom@acropolis.ucam.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: nasm generates incorrect addresses in certain circumstancesw
X-Mailer: reportbug 1.44
Date: Sun, 03 Mar 2002 02:34:58 +0000
Bcc: Tom Lees <tal26@cam.ac.uk>
Message-Id: <E16hLpq-0004zS-00@theseus.acropolis.ucam.org>
Delivered-To: submit@bugs.debian.org

Package: nasm
Version: 0.98.08-1
Severity: normal

Hmm... took me almost an hour to track this one down after my (small) OS
kept crashing VMware for no apparent reason.

Assemble the following two files to ELF objects:

--- CUT f1.asm ---
struc s1
.s11	resd 1
endstruc

bits 32
section .stext exec

t1:	mov		eax,[sbss_1]

section .data
section .bss

resb 0x2000

global sbss_1
sbss_1 resd 1
--- END CUT f1.asm ---

--- CUT f2.asm ---
bits 32
section .text
extern sbss_1
t2:	mov		eax,[sbss_1]
--- END CUT f2.asm ---

...and link them to an executable. You will find that the address used for
sbss_1 in f1.o is out by 0x2000 (or whatever you change the 0x2000 to in
f1.asm above), for example:

Script started on Sun Mar  3 02:20:35 2002
tom@cronos:~/proj/t$ nasm -felf f1.asm
tom@cronos:~/proj/t$ nasm -felf f2.asm
tom@cronos:~/proj/t$ ld -o test f1.o f2.o
ld: warning: cannot find entry symbol _start; defaulting to 08048080
tom@cronos:~/proj/t$ objdump --disassemble test

test:     file format elf32-i386

Disassembly of section .text:

08048080 <t2>:
 8048080:	a1 8c b0 04 08       	mov    0x804b08c,%eax
 					            ^
Disassembly of section .stext:

08048085 <t1>:
 8048085:	a1 8c d0 04 08       	mov    0x804d08c,%eax
 						    ^
tom@cronos:~/proj/t$ 

Furthermore, this bug occurs ONLY when a structure is defined at the top of
f1.asm as above - if the structure is defined after section .stext is
introduced, or the structure is not defined at all then the bug does not
appear (although adding section .other before the structure does not stop
the bug from occuring). Neither does it appear if we rename the section
.stext to .text.

The "section .data" line is also required to trigger the bug.

I am afraid I have absolutely no idea what is causing this. It could well be
a bug in ld (binutils 2.11.93.0.2-2), I don't know.

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux cronos 2.4.18 #2 Thu Feb 28 21:55:26 GMT 2002 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages nasm depends on:
ii  libc6                         2.2.4-7    GNU C Library: Shared libraries an


---------------------------------------
Received: (at 136525-close) by bugs.debian.org; 17 Apr 2002 11:38:23 +0000
>From katie@auric.debian.org Wed Apr 17 06:38:23 2002
Return-path: <katie@auric.debian.org>
Received: from auric.debian.org [206.246.226.45] (mail)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 16xnlX-00048z-00; Wed, 17 Apr 2002 06:38:23 -0500
Received: from katie by auric.debian.org with local (Exim 3.12 1 (Debian))
	id 16xnfW-0005re-00; Wed, 17 Apr 2002 07:32:10 -0400
From: Christian Kesselheim <ckesselh@debian.org>
To: 136525-close@bugs.debian.org
X-Katie: $Revision: 1.13 $
Subject: Bug#136525: fixed in nasm 0.98.28bf-1
Message-Id: <E16xnfW-0005re-00@auric.debian.org>
Sender: Archive Administrator <katie@auric.debian.org>
Date: Wed, 17 Apr 2002 07:32:10 -0400
Delivered-To: 136525-close@bugs.debian.org

We believe that the bug you reported is fixed in the latest version of
nasm, which is due to be installed in the Debian FTP archive:

nasm_0.98.28bf-1.diff.gz
  to pool/main/n/nasm/nasm_0.98.28bf-1.diff.gz
nasm_0.98.28bf-1.dsc
  to pool/main/n/nasm/nasm_0.98.28bf-1.dsc
nasm_0.98.28bf-1_i386.deb
  to pool/main/n/nasm/nasm_0.98.28bf-1_i386.deb
nasm_0.98.28bf.orig.tar.gz
  to pool/main/n/nasm/nasm_0.98.28bf.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 136525@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Kesselheim <ckesselh@debian.org> (supplier of updated nasm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 17 Apr 2002 12:28:43 +0200
Source: nasm
Binary: nasm
Architecture: source i386
Version: 0.98.28bf-1
Distribution: unstable
Urgency: high
Maintainer: Christian Kesselheim <ckesselh@debian.org>
Changed-By: Christian Kesselheim <ckesselh@debian.org>
Description: 
 nasm       - General-purpose x86 assembler
Closes: 122295 128498 132755 136263 136525
Changes: 
 nasm (0.98.28bf-1) unstable; urgency=high
 .
   * New maintainer
   * New upstream release; switched back to the bugfixed ("bf") branch
     (closes: #136263)
   * ndisasm segfaults no longer on "damn near any file" (closes: #128498)
   * Broken macros fixed (closes: #132755)
   * The "org" directive is no longer case sensitive :-) (closes: #122295)
   * Nasm should not generate wrong addresses in some .text situations
     any more (closes: #136525)
Files: 
 eec0a7d50e0498659dc6d9c63e1bb587 619 devel optional nasm_0.98.28bf-1.dsc
 4a16c59ff6bb7483d4e9a9244119043e 426548 devel optional nasm_0.98.28bf.orig.tar.gz
 8d0f0606f3e348d070dbf6abac543b56 60970 devel optional nasm_0.98.28bf-1.diff.gz
 9ef9fd2596b9fac1efb429edfb3fdcd3 561378 devel optional nasm_0.98.28bf-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8vVssgT6qkXTqfkcRAoIkAKDx5IHMM4BmJU9WkDPdi8vbTlxuYwCeLaWg
w9QkqHlDaXoQqstiQwGwIXI=
=/3ep
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to debian-qa-packages-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: