[solved] DJGPP SIGSEGVs

Programming, for all ages and all languages.
Post Reply
stranger
Posts: 17
Joined: Thu Mar 03, 2011 4:05 am

[solved] DJGPP SIGSEGVs

Post by stranger »

Hi, gcc.exe, cpp.exe and possible more binaries from gcc470b.zip from current (203) branch terminates with SIGSEGV. This happens only on one particular computer with MS-DOS 6.22.

Code: Select all

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 5
model name      : Celeron (Covington)
stepping        : 1
microcode       : 0x29
cpu MHz         : 300.684
cache size      : 32 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pse36 mmx fxsr
bogomips        : 601.42
clflush size    : 32
cache_alignment : 32
address sizes   : 36 bits physical, 32 bits virtual
power management:

BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000000f00000 (usable)
 BIOS-e820: 0000000000f00000 - 0000000001000000 (reserved)
 BIOS-e820: 0000000001000000 - 0000000008000000 (usable)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
Same binaries work with dosbox, virtualbox + MS-DOS 6.22, 80386DX + MS-DOS 6.22.

Code: Select all

Exiting due to signal SIGSEGV
Page fault at eip=00040d11, error=0004
eax=00000000 ebx=0016b5a0 ecx=00000001 edx=00000000 esi=001f1cb8 edi=0000b038
ebp=001f1c98 esp=001f1ad0 program=C:\DJGPP\BIN\GCC.EXE
cs: sel=00a7 base=00400000 limit=001fffff
ds: sel=00af base=00400000 limit=001fffff
es: sel=00af base=00400000 limit=001fffff
fs: sel=008f base=00014880 limit=0000ffff
gs: sel=00bf base=00000000 limit=0010ffff
ss: sel=00af base=00400000 limit=001fffff
App stack: [001f1d94..00171d94] Exceptn stack: [0017179c..0016f85c]

Call frame traceback EIPs:
0x00040d11
0x0004019a
0x0014aab8
Typed down so expect typos. Why this happens only on that one particular machine and how can I fix it? How can I redirect such error output to file in MS-DOS? Thanks.
Last edited by stranger on Tue Jun 19, 2012 3:54 am, edited 1 time in total.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: DJGPP SIGSEGVs

Post by Love4Boobies »

I think you've mistaken us for either the GCC or DJGPP mailing list/bug tracker. I do understand that you plan on using this toolchain for OS development but it's analogous to asking us about a bug in Adobe Reader that prevents you from reading a piece of technical documentation useful in implementing your OS.

It's not that I'm bothered that you've asked on this board, as you did use the "Everything Else" subforum. But it does seem like a really bad idea to ask in an unrelated place, where you are way less likely to find a solution.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
iansjack
Member
Member
Posts: 4687
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: DJGPP SIGSEGVs

Post by iansjack »

What processor does the problem machine have?
stranger
Posts: 17
Joined: Thu Mar 03, 2011 4:05 am

Re: DJGPP SIGSEGVs

Post by stranger »

300MHz Celeron, all info in code tags in OP comes from offending machine.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: DJGPP SIGSEGVs

Post by Love4Boobies »

Have you reported the bug yet?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
iansjack
Member
Member
Posts: 4687
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: DJGPP SIGSEGVs

Post by iansjack »

Could be that it was compiled for a Pentium and is using multimedia instructions (or some other feature) that don't exist on the Celeron. Have you tried it on another Celeron? I would say that you should:

1. Report the bug, as already suggested.

2. Compile gcc from source on your machine.
stranger
Posts: 17
Joined: Thu Mar 03, 2011 4:05 am

Re: DJGPP SIGSEGVs

Post by stranger »

Mystery solved, I have misstyped "set DJGPP=C:\DJGPP\DJPP.ENV" line in autoexec.bat and that caused gcc to SIGSEGV. GCC < 4.6 handles this kind of invalid input with more descriptive error mesage.
Post Reply