-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Crystal 0.27.1 built with --release crashes immediately with OverflowError #7368
Comments
When I say "immediately" I mean it: if I pass |
Using `getrlimit` led to invalid STACK SIZE limits in some cases which in turn led to an integer overflow while detecting the stack base of the main stack. This patch replaces `getrlimit` with proper, but non portable, calls to pthread functions that return the stack of a given thread. fixes crystal-lang#7368 fixes crystal-lang#7369
Using `getrlimit` led to invalid STACK SIZE limits in some cases which in turn led to an integer overflow while detecting the stack base of the main stack. This patch replaces `getrlimit` with proper, but non portable, calls to pthread functions that return the stack of a given thread. fixes crystal-lang#7368 fixes crystal-lang#7369
Using `getrlimit` led to invalid STACK SIZE limits in some cases which in turn led to an integer overflow while detecting the stack base of the main stack. This patch replaces `getrlimit` with proper, but non portable, calls to pthread functions that return the stack of a given thread. fixes crystal-lang#7368 fixes crystal-lang#7369
Here are cases of (what I think is) this problem caught in CI: |
This is an unfortunate course of events. An unexpected bogus value with RLIMIT_STACK on Linux when run inside Weirdly, it affects a simple hello world program, but doesn't affect the compiler built in non-release mode. It only affects the compiler when built with That could have been found out sooner, but compiling crystal in release mode takes a long time, so I usually only use a manually built compiler in non-release mode —I guess nightly does the same? |
@oprypin catching before release today is only available as docker images which none of those projects use unfortunately. As @ysbaddaden pointed, checks in nightly can be be improved. The compiler used during the specs is not built in release mode, and the distributable which is compiled in release mode is not actually used. |
Using the compiled packages to run specs would have caught #7289 also. |
Using `getrlimit` led to invalid STACK SIZE limits in some cases which in turn led to an integer overflow while detecting the stack base of the main stack. This patch replaces `getrlimit` with proper, but non portable, calls to pthread functions that return the stack of a given thread. fixes #7368 fixes #7369
Using `getrlimit` led to invalid STACK SIZE limits in some cases which in turn led to an integer overflow while detecting the stack base of the main stack. This patch replaces `getrlimit` with proper, but non portable, calls to pthread functions that return the stack of a given thread. fixes #7368 fixes #7369
If I compile 0.27.1 (or master) with
--release -Dpreview_overflow
, then I can't compile anything anymore, not even Crystal itself. The compiler crashes immediately:Note that I can build a working compiler with
-Dpreview_overflow
only (without--release
).All my Travis jobs are currently broken, since the Linux packages of 0.27.1 have been built with these options.
OS: Ubuntu 14.04
Target: x86_64-linux-gnu
The text was updated successfully, but these errors were encountered: