Hey,

You put that quite large buffer on stack. Does the page fault occur in the 
stack area 0x40000000..0x50000000? Our stacks have a limited size and do not 
grow automatically.

Greets
Christian

On October 30, 2014 8:01:05 PM CET, Johannes Schlatow 
<[email protected]> wrote:
>Hey everyone,
>
>I'm using some 3rd party code that depends on zlib. In particular, it
>uses gzread() in order to read a file. Unfortunately, the
>corresponding piece of code causes a segfault in ld.lib.so.
>
>I narrowed this down to the following minimum example:
>
>  gzFile gzfile_components = gzopen("test.txt", "rb");
>  unsigned char buffer[1024*1024];
>  gzread(gzfile_components, buffer, sizeof(buffer));
>
>As you can see, the buffer is quite large but this the actual (and
>reasonable) value used in the 3rd party code.
>As soon as I reduce the size to e.g. 4096, the segfault is gone. 
>
>The file I used has a size of 293 bytes. I'm using base-linux.
>I also remember using this code successfully on a different computer
>with an older version of Genode (14.03).
>
>Any ideas/comments on this?
>
>------------------------------------------------------------------------------
>_______________________________________________
>genode-main mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/genode-main

-- 
Christian Helmuth
Genode Labs

http://www.genode-labs.com/ · http://genode.org/ · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

------------------------------------------------------------------------------
_______________________________________________
genode-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to