FAIL!

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
dosfan
Member
Member
Posts: 65
Joined: Tue Oct 14, 2008 1:18 pm
Location: Scotland

FAIL!

Post by dosfan »

Gcc port: epic fail.

Err, version string looking good though! More work required me thinks.
fail.JPG
All your base are belong to us.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: FAIL!

Post by earlz »

nice lol let's hope your OS knows how to free a process' memory when it crashes
Osbios
Member
Member
Posts: 116
Joined: Fri Jun 10, 2005 11:00 pm

Re: FAIL!

Post by Osbios »

Looks like you need a 64bit system just to be able to feed your memory hungry gcc. ^.^
dosfan
Member
Member
Posts: 65
Joined: Tue Oct 14, 2008 1:18 pm
Location: Scotland

Re: FAIL!

Post by dosfan »

Bit confused with this one as the only interface available to increase heap is sbrk() which uses a signed int.. so how can it attempt to allocate 0xfffffff0 bytes :shock:
All your base are belong to us.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: FAIL!

Post by pcmattman »

Make sure sysconf for _SC_PAGESIZE doesn't return -1 ;)

EDIT: This is because GCC assumes sysconf is implemented and doesn't check the return value. After all, there's not much that can throw an error when obtaining the system page size.

Congrats on getting it working, by the way!
dosfan
Member
Member
Posts: 65
Joined: Tue Oct 14, 2008 1:18 pm
Location: Scotland

Re: FAIL!

Post by dosfan »

You could tell it was a signed vs unsigned issue. I remember having to modify the prototype for newlib's getpagesize() to return int instead of caddr_t to get it compile.
pcmattman wrote:Make sure sysconf for _SC_PAGESIZE doesn't return -1 ;)
Without even trying it I know you are absolutely on the money there. It does. Thanks!
All your base are belong to us.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: FAIL!

Post by pcmattman »

No worries - it's a problem I've run into before so I knew exactly how to fix it :)
Post Reply