This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Segmentation fault before main
- From: Marco Atzeri <marco dot atzeri at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 4 Nov 2015 22:42:44 +0100
- Subject: Re: Segmentation fault before main
- Authentication-results: sourceware.org; auth=none
- References: <56338BCC dot 40709 at gmail dot com> <20151030191826 dot GQ5319 at calimero dot vinschen dot de> <5633C8D0 dot 2060101 at gmail dot com>
On 30/10/2015 20:45, Marco Atzeri wrote:
On 30/10/2015 20:18, Corinna Vinschen wrote:
On Oct 30 16:25, Marco Atzeri wrote:
Hi Corinna,
Any help will be really appreciated.
Well, it's a stack probe. It's typically called when trying to allocate
big datastructures on the stack, e.g. with alloca. Did you try to raise
the default stacksize in the executable header (see peflags -x and -X
options). There's not much else to work with...
For the archive, I found the culprit in the test code.
Using "%lu" to print int is not a good idea on cygwin 64 bit.
- bbprintf0(stmt,"%ssize_t %s_countset[%lu] = {",
+ bbprintf0(stmt,"%ssize_t %s_countset[%u] = {",
indented(1),
cname(vsym),
rank);
as it could produce
size_t br_startset[25769803777] = {0} ;
size_t br_countset[25769803777] = {2};
instead of
size_t br_startset[1] = {0} ;
size_t br_countset[1] = {2};
as 25769803777 = 0x00060001
Regards
Marco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple