www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4771] New: fail_compilation/fail274.d hits a halt in iasm.c

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4771

           Summary: fail_compilation/fail274.d hits a halt in iasm.c
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: braddr puremagic.com


--- Comment #0 from Brad Roberts <braddr puremagic.com> 2010-08-30 23:52:18 PDT
---
../src/dmd -Ifail_compilation -odtest_results/fail_compilation
-oftest_results/fail_compilation/fail274 -c fail_compilation/fail274.d

fail_compilation/fail274.d(2): ] expected instead of ';'

Program received signal SIGSEGV, Segmentation fault.
0x08128b17 in halt () at mars.c:230
230         *(char*)0=0;
(gdb) bt
#0  0x08128b17 in halt () at mars.c:230
#1  0x0811571e in asmerr (errnum=16) at iasm.c:1858
#2  0x0811316c in asm_chktok (toknum=TOKrbracket, errnum=16) at iasm.c:541
#3  0x08118b99 in asm_br_exp () at iasm.c:3840
#4  0x08118898 in asm_mul_exp () at iasm.c:3748
#5  0x081187c3 in asm_add_exp () at iasm.c:3709
#6  0x081186ab in asm_shift_exp () at iasm.c:3681
#7  0x0811857b in asm_rel_exp () at iasm.c:3630
#8  0x08118440 in asm_equal_exp () at iasm.c:3587
#9  0x0811839c in asm_and_exp () at iasm.c:3564
#10 0x081182f8 in asm_xor_exp () at iasm.c:3541
#11 0x08118254 in asm_inc_or_exp () at iasm.c:3518
#12 0x08118198 in asm_log_and_exp () at iasm.c:3495
#13 0x081180dc in asm_log_or_exp () at iasm.c:3473
#14 0x0811807c in asm_cond_exp () at iasm.c:3453
#15 0x081199d4 in AsmStatement::semantic (this=0x820e6f8, sc=0x82430e8) at
iasm.c:4478
#16 0x08165818 in CompoundStatement::semantic (this=0x820e740, sc=0x82430e8) at
statement.c:481
#17 0x080f82a2 in FuncDeclaration::semantic3 (this=0x820e590, sc=0x8243058) at
func.c:1215
#18 0x0812d6b2 in Module::semantic3 (this=0x820e068) at module.c:859
#19 0x0812ab72 in main (argc=11, argv=0x82044d0) at mars.c:1193

A regression hunt shows that this was caused by r605 which did affect iasm.c in
big ways (despite the fairly innocent submit comment)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 30 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4771


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #1 from Brad Roberts <braddr puremagic.com> 2010-08-30 23:58:23 PDT
---
Removing the halt that looks like left a left over debug aid based on it's
indentation does remove the problem.  The expected test failure still fails as
expected.

diff --git a/src/iasm.c b/src/iasm.c
index 2776d73..2261b76 100644
--- a/src/iasm.c
+++ b/src/iasm.c
   -1855,7 +1855,6    STATIC void asmerr(int errnum, ...)

     printf("\n");
     fflush(stdout);
-halt();
     longjmp(asmstate.env,1);
 }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 30 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4771


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2010-09-01
22:03:56 PDT ---
http://www.dsource.org/projects/dmd/changeset/656

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 01 2010