http://d.puremagic.com/issues/show_bug.cgi?id=8639

           Summary: dmd buffer overflow related to function literal,
                    real.max, template alias parameter
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Keywords: ice
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: nilsboss...@googlemail.com


--- Comment #0 from Nils <nilsboss...@googlemail.com> 2012-09-11 00:27:07 PDT 
---
Compiles with 2.058.

---
cat > test.d << code
void t(alias a)() {}
void main() {
  t!({auto r = real.max;})();
}
code
dmd test.d
---
*** buffer overflow detected ***: dmd terminated
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(__fortify_fail+0x45)[0xf755add5]
/lib/i386-linux-gnu/libc.so.6(+0xfebaa)[0xf7559baa]
/lib/i386-linux-gnu/libc.so.6(+0xfe208)[0xf7559208]
/lib/i386-linux-gnu/libc.so.6(__overflow+0x4b)[0xf74cbfbb]
/lib/i386-linux-gnu/libc.so.6(+0x49e28)[0xf74a4e28]
/lib/i386-linux-gnu/libc.so.6(_IO_vfprintf+0x140f)[0xf749cbff]
/lib/i386-linux-gnu/libc.so.6(__vsprintf_chk+0xc9)[0xf75592d9]
/lib/i386-linux-gnu/libc.so.6(__sprintf_chk+0x2f)[0xf75591ef]
dmd[0x80e0377]
dmd[0x80e0471]
dmd[0x80a1fe3]
dmd[0x8147cff]
dmd[0x814401d]
dmd[0x80e360c]
dmd[0x815616e]
dmd[0x816037b]
dmd[0x80a98c8]
dmd[0x81627dd]
dmd[0x80ae828]
dmd[0x80b24f6]
dmd[0x80aad59]
dmd[0x8141901]
dmd[0x8140ccc]
dmd[0x80f666a]
dmd[0x80f54d8]
dmd[0x810e504]
dmd[0x810f61b]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xf74744d3]
======= Memory map: ========
08048000-081d8000 r-xp 00000000 08:06 14161076                          
/home/nils/d/dmd2.060/dmd2/linux/bin32/dmd
081d8000-081d9000 r--p 0018f000 08:06 14161076                          
/home/nils/d/dmd2.060/dmd2/linux/bin32/dmd
081d9000-081f3000 rw-p 00190000 08:06 14161076                          
/home/nils/d/dmd2.060/dmd2/linux/bin32/dmd
081f3000-081fa000 rw-p 00000000 00:00 0 
0905c000-090eb000 rw-p 00000000 00:00 0                                  [heap]
f6b00000-f6b21000 rw-p 00000000 00:00 0 
f6b21000-f6c00000 ---p 00000000 00:00 0 
f6c57000-f6c58000 ---p 00000000 00:00 0 
f6c58000-f745b000 rw-p 00000000 00:00 0 
f745b000-f75fa000 r-xp 00000000 08:05 396976                            
/lib/i386-linux-gnu/libc-2.15.so
f75fa000-f75fc000 r--p 0019f000 08:05 396976                            
/lib/i386-linux-gnu/libc-2.15.so
f75fc000-f75fd000 rw-p 001a1000 08:05 396976                            
/lib/i386-linux-gnu/libc-2.15.so
f75fd000-f7600000 rw-p 00000000 00:00 0 
f7600000-f761c000 r-xp 00000000 08:05 399715                            
/lib/i386-linux-gnu/libgcc_s.so.1
f761c000-f761d000 r--p 0001b000 08:05 399715                            
/lib/i386-linux-gnu/libgcc_s.so.1
f761d000-f761e000 rw-p 0001c000 08:05 399715                            
/lib/i386-linux-gnu/libgcc_s.so.1
f761e000-f7648000 r-xp 00000000 08:05 396988                            
/lib/i386-linux-gnu/libm-2.15.so
f7648000-f7649000 r--p 00029000 08:05 396988                            
/lib/i386-linux-gnu/libm-2.15.so
f7649000-f764a000 rw-p 0002a000 08:05 396988                            
/lib/i386-linux-gnu/libm-2.15.so
f764a000-f764b000 rw-p 00000000 00:00 0 
f764b000-f7662000 r-xp 00000000 08:05 399637                            
/lib/i386-linux-gnu/libpthread-2.15.so
f7662000-f7663000 r--p 00016000 08:05 399637                            
/lib/i386-linux-gnu/libpthread-2.15.so
f7663000-f7664000 rw-p 00017000 08:05 399637                            
/lib/i386-linux-gnu/libpthread-2.15.so
f7664000-f7666000 rw-p 00000000 00:00 0 
f7666000-f773e000 r-xp 00000000 08:05 1320530                           
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
f773e000-f773f000 ---p 000d8000 08:05 1320530                           
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
f773f000-f7743000 r--p 000d8000 08:05 1320530                           
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
f7743000-f7744000 rw-p 000dc000 08:05 1320530                           
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
f7744000-f774b000 rw-p 00000000 00:00 0 
f7774000-f7777000 rw-p 00000000 00:00 0 
f7777000-f7778000 r-xp 00000000 00:00 0                                  [vdso]
f7778000-f7798000 r-xp 00000000 08:05 393402                            
/lib/i386-linux-gnu/ld-2.15.so
f7798000-f7799000 r--p 0001f000 08:05 393402                            
/lib/i386-linux-gnu/ld-2.15.so
f7799000-f779a000 rw-p 00020000 08:05 393402                            
/lib/i386-linux-gnu/ld-2.15.so
ffb8f000-ffbb0000 rw-p 00000000 00:00 0                                 
[stack]
Aborted (core dumped)
---

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

Reply via email to