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

Segfault in "bare-mode" #567

Closed
slabanja opened this issue Mar 11, 2012 · 1 comment
Closed

Segfault in "bare-mode" #567

slabanja opened this issue Mar 11, 2012 · 1 comment

Comments

@slabanja
Copy link

Starting Julia with the -b option ("Bare: don't load default startup files"), starts the Julia process with a few variables being uninitialized (e.g. jl_get_system_hooks is never called), leading to a segmentation violation upon e.g. any error (jl_errorf) since jl_new_struct expects to be able to dereference its first argument.

E.g.

julia> asdf
Program received signal SIGSEGV, Segmentation fault.
0x00000000004669ba in jl_new_struct (type=0x0) at alloc.c:82
82 if (type->instance != NULL) return type->instance;
(gdb) info stack
#0 0x00000000004669ba in jl_new_struct (type=0x0) at alloc.c:82
#1 0x000000000042cf99 in jl_errorf (fmt=0xbca5d0 "%s not defined") at builtins.c:40
#2 0x0000000000465af9 in eval (e=0x106b760, locals=0x0, nl=0) at interpreter.c:85

...

Instead of segfaulting upon error, I would have expected "julia -b" to behave like some kind of minimum/bare interpreter.

@JeffBezanson
Copy link
Sponsor Member

Fixed by un-documenting -b, since it's now only for internal use.

LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Oct 11, 2021
* Remove fptype

* Add generic alternatives for _autodot and _crossdot
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

2 participants