Skip to content

Commit f053663

Browse files
committed
fix stacktrace & misc tests
1 parent 637f64e commit f053663

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ast.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static value_t fl_current_module_counter(fl_context_t *fl_ctx, value_t *args, ui
228228
}
229229
// Create the string
230230
char buf[(funcname != NULL ? strlen(funcname) : 0) + 20];
231-
if (funcname != NULL && funcname[0] != '#') {
231+
if (funcname != NULL && funcname[0] != '#' && !isdigit(funcname[strlen(funcname)-1])) {
232232
uint32_t nxt;
233233
uv_mutex_lock(&counter_table_lock);
234234
// try to find the module name in the counter table, if it's not create a symbol table for it
@@ -250,7 +250,7 @@ static value_t fl_current_module_counter(fl_context_t *fl_ctx, value_t *args, ui
250250
// to avoid the counter being 0 or 1, which are reserved
251251
ptrhash_put(mod_table, funcname, (void*)(uintptr_t)((nxt + 1) << 2 | 3));
252252
uv_mutex_unlock(&counter_table_lock);
253-
snprintf(buf, sizeof(buf), "%s%d", funcname, nxt);
253+
snprintf(buf, sizeof(buf), "<%s>%d", funcname, nxt);
254254
}
255255
else {
256256
snprintf(buf, sizeof(buf), "%d", jl_module_next_counter(ctx->module));

src/datatype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static jl_sym_t *jl_demangle_typename(jl_sym_t *s) JL_NOTSAFEPOINT
3636
len = strlen(n) - 1;
3737
else
3838
len = (end-n) - 1; // extract `f` from `#f#...`
39-
if (is10digit(n[1]) || is_anonfn_typename(n))
39+
if (is10digit(n[1]) || (end != n && is10digit(end[-1])))
4040
return _jl_symbol(n, len+1);
4141
return _jl_symbol(&n[1], len);
4242
}

0 commit comments

Comments
 (0)