[nosp] Assertion failed: (Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!")
bsdjhb opened this issue · 5 comments
This assertion was triggered when compiling crypto/openssl/crypto/dso/dso_dlfcn.c in the dlfcn_pathbyaddr() function. creduce reduced the failure to:
typedef struct { int *a } b;
static c() {
struct {
void *d
} f = {c};
dladdr(f);
}
b e = {c};
This sounds like it could be the issue I fixed in the dev branch in 5fbfb58 . Does that patch also apply to the nosp branch?
I applied it locally but still got the crash.
What is the clang command? If I run this on the dev branch with clang -cc1 -internal-isystem /Users/alex/cheri/llvm/cmake-build-debug/lib/clang/6.0.0/include -nostdsysteminc -triple cheri-unknown-freebsd -target-cpu cheri -triple cheri-unknown-freebsd -target-abi purecap -emit-obj -O2 /Users/alex/cheri/llvm/tools/clang/test/CodeGen/CHERI/cheri-issue-244.c -o /dev/null
It passes for me. I don't have a nosp build right now so it might be something new in nosp.
I am just using the '.sh' file from the crash I got trying to build world with the 'nosp' branch, so the command is quite long (and it's from my desktop, not zeno):
/usr/cheri/bin/clang-5.0 -cc1 -triple cheri-unknown-freebsd -emit-obj -disable-free -main-file-name dso_dlfcn.c -mrelocation-model pic -pic-level 1 -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -target-cpu cheri -target-feature +soft-float -target-abi purecap -Wmips-cheri-prototypes -msoft-float -mfloat-abi soft -mllvm -mips-ssection-threshold=0 -dwarf-column-info -debug-info-kind=standalone -dwarf-version=2 -debugger-tuning=gdb -coverage-notes-file /usr/obj/mips.mips64/usr/home/john/work/cheri/git/cheribsd/worldcheri/usr/home/john/work/cheri/git/cheribsd/secure/lib/libcrypto/dso_dlfcn.gcno -sys-header-deps -D TERMIOS -D ANSI_SOURCE -D OPENSSL_THREADS -D DSO_DLFCN -D HAVE_DLFCN_H -D B_ENDIAN -D __LP64__=1 -O2 -Wno-deprecated-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -std=gnu89 -ferror-limit 19 -fmessage-length 80 -ftls-model=local-exec -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -cheri-linker -x c dso_dlfcn-c41ebb.c
I did not see this when building CheriBSD with stock clang previously, so it might be something specific to 'nosp'
Closing as this appears fixed. Please reopen if it isn't.