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

Creating symbols from invalid Unicode characters causes segfault #6027

Closed
jiahao opened this issue Mar 3, 2014 · 1 comment
Closed

Creating symbols from invalid Unicode characters causes segfault #6027

jiahao opened this issue Mar 3, 2014 · 1 comment
Labels
unicode Related to unicode characters and encodings

Comments

@jiahao
Copy link
Member

jiahao commented Mar 3, 2014

I was trying to trap #5712 by autogenerating a bunch of variables with unicode names, and came across this segfault:

julia> symbol(char(0xdcdb))

Program received signal SIGSEGV, Segmentation fault.
0x000000010012f263 in fl_raise ()
(gdb) bt
#0  0x000000010012f263 in fl_raise ()
#1  0x000000010012f3e0 in lerrorf ()
#2  0x000000010012fb4f in symbol ()
#3  0x0000000100068ce9 in julia_to_scm (v=0x101156a80) at ast.c:378
#4  0x000000010006b8d4 in array_to_list (a=0x1024a8d40) at ast.c:358
#5  0x0000000100068daa in julia_to_scm (v=0x1024aea20) at ast.c:391
#6  0x000000010006b8d4 in array_to_list (a=0x1024a8d80) at ast.c:358
#7  0x0000000100068daa in julia_to_scm (v=0x1024aea40) at ast.c:391
#8  0x000000010006983b in jl_expand (expr=0x1024aea40) at ast.c:506
#9  0x0000000100120f0c in jl_toplevel_eval_flex (e=0x1024aea40, fast=1) at toplevel.c:432
#10 0x0000000100121c98 in jl_toplevel_eval (v=0x1024aea40) at toplevel.c:493
#11 0x000000010006e6ad in jl_f_top_eval (F=0x10196fb80, args=0x7fff5fbfef98, nargs=2) at builtins.c:377
#12 0x0000000102bad7ed in julia_eval_user_input14869 ()
#13 0x0000000102badaf1 in jlcall_julia_eval_user_input14869 ()
#14 0x00000001000643e8 in jl_apply_generic (F=0x1042ab1e0, args=0x7fff5fbff180, nargs=2) at gf.c:1372
#15 0x0000000102ba4728 in julia_run_repl14618 ()

Note that 0xdcdb is a valid Unicode code point, but an invalid Unicode character.

@jiahao jiahao added the unicode label Mar 3, 2014
@JeffBezanson
Copy link
Member

Ah, this is because it didn't used to be possible for creating a symbol to raise errors. Now it can raise a normalization error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unicode Related to unicode characters and encodings
Projects
None yet
Development

No branches or pull requests

2 participants