You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The top design unit to report A=2 when ran. But it crashes.
the conf design unit to report A=4 when ran. But it crashes.
MWE:
entityentisgeneric (A: integer:=0);
endentityent;
architecturearchofentisbeginassertfalsereport"A="&integer'image(A);
endarchitecturearch;
--------------------------------------------------------------------------------entitytopisendentitytop;
architecturearchoftopiscomponententisgeneric (A: integer:=1);
endcomponentent;
for inst : ent useentity work.ent genericmap (A =>2);
begin
inst : component ent genericmap (A =>3);
endarchitecturearch;
--------------------------------------------------------------------------------configuration conf of top isfor arch
for inst : ent
genericmap (A =>4);
endfor;
endfor;
endconfiguration conf;
Yeah this case isn't really supported at the moment. Semantically it should be the same as use open and that would have triggered an assert. I've changed it to report an error instead of crash.
I think this could be connected to #1092.
For the following MWE, I expect:
top
design unit to reportA=2
when ran. But it crashes.conf
design unit to reportA=4
when ran. But it crashes.MWE:
nvc --std=08 -a --relaxed mwe.vhd -e top -r
crash output
nvc --std=08 -a --relaxed mwe.vhd -e conf -r
crash output
nvc: ../src/tree.c:998: tree_ref: Assertion `item->object != NULL' failed.
*** Caught signal 6 (SIGABRT) ***
[0x55e58626cedc] ../src/util.c:897 signal_handler
--> show_stacktrace();
[0x7f1c915c531f] (/usr/lib/x86_64-linux-gnu/libc.so.6)
[0x7f1c9161eb1c] (/usr/lib/x86_64-linux-gnu/libc.so.6) ./nptl/pthread_kill.c:44 __pthread_kill_implementation
[0x7f1c9161eb1c] (/usr/lib/x86_64-linux-gnu/libc.so.6) ./nptl/pthread_kill.c:78 __pthread_kill_internal
[0x7f1c9161eb1c] (/usr/lib/x86_64-linux-gnu/libc.so.6) ./nptl/pthread_kill.c:89 pthread_kill@@GLIBC_2.34
[0x7f1c915c526d] (/usr/lib/x86_64-linux-gnu/libc.so.6) ../sysdeps/posix/raise.c:26 raise
[0x7f1c915a88fe] (/usr/lib/x86_64-linux-gnu/libc.so.6) ./stdlib/abort.c:79 abort
[0x7f1c915a881a] (/usr/lib/x86_64-linux-gnu/libc.so.6) ./assert/assert.c:94 __assert_fail_base.cold
[0x7f1c915bb506] (/usr/lib/x86_64-linux-gnu/libc.so.6) ./assert/assert.c:103 __assert_fail
[0x55e5862b5814] ../src/tree.c:998 tree_ref
item_t *item = lookup_item(&tree_object, t, I_REF);
--> assert(item->object != NULL);
return container_of(item->object, struct _tree, object);
[0x55e5862e927b] ../src/simp.c:1727 simp_tree
case T_PACKAGE_MAP:
--> simp_generic_map(t, tree_ref(t));
return t;
[0x55e586304dee] ../src/object.c:715 object_rewrite_iter
for (;;) {
--> object_t *new = (*ctx->post_fn[object->tag])(object, ctx->context);
if (new == object || (object = object_rewrite(new, ctx)) == NULL)
[0x55e58630554b] ../src/object.c:815 object_rewrite
else if (ctx->post_fn[object->tag] != NULL) {
--> object_t *new = object_rewrite_iter(object, ctx);
object_write_barrier(object, new);
[0x55e586305295] ../src/object.c:779 object_rewrite
object_t *o = object->items[n].object;
--> object->items[n].object = object_rewrite(o, ctx);
object_write_barrier(object, o);
[0x55e5863053b1] ../src/object.c:790 object_rewrite
object_t *o = object->items[n].obj_array->items[i];
--> if ((o = object_rewrite(o, ctx))) {
object_write_barrier(object, o);
[0x55e5863053b1] ../src/object.c:790 object_rewrite
object_t *o = object->items[n].obj_array->items[i];
--> if ((o = object_rewrite(o, ctx))) {
object_write_barrier(object, o);
[0x55e5862b8a25] ../src/tree.c:1310 tree_rewrite
--> object_t *result = object_rewrite(&(t->object), &ctx);
free(ctx.cache);
[0x55e5862e95c7] ../src/simp.c:1810 simplify_local
--> tree_rewrite(top, simp_pre_cb, simp_tree, NULL, &ctx);
[0x55e5862f6779] ../src/common.c:2490 analyse_file
--> simplify_local(unit, jit, ur);
bounds_check(unit);
[0x55e586262037] ../src/nvc.c:262 analyse
else
--> analyse_file(argv[i], jit, state->registry);
}
[0x55e586266c4a] ../src/nvc.c:2193 process_command
case 'a':
--> return analyse(argc, argv, state);
case 'e':
[0x55e58626718d] ../src/nvc.c:2355 main
--> const int ret = process_command(argc, argv, &state);
The text was updated successfully, but these errors were encountered: