Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible crash on Linux with large stack size #13

Open
ip1981 opened this issue May 14, 2014 · 0 comments
Open

Possible crash on Linux with large stack size #13

ip1981 opened this issue May 14, 2014 · 0 comments

Comments

@ip1981
Copy link

ip1981 commented May 14, 2014

You can try to malloc a large amount of memory, malloc will return NULL and pxz will crash in snprintf:
https://github.com/jnovy/pxz/blob/master/pxz.c#L244

As far as I remember ARG_MAX in glibc depends on stack size:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sysconf.c;h=25208cdc539233c9a6d86380bdc283b9e2cb6247;hb=HEAD#l90

# getconf ARG_MAX
2097152
# ulimit -s unlimited
# getconf ARG_MAX
4611686018427387903
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant