leaningtech/cheerp-meta

Crash at LinearMemoryHelper

Closed this issue · 2 comments

crash_CheerpWasmWriter.zip

This case crash at LinearMemoryHelper, but it can't be linked by clang as well.

But I think may indicate some hidden bugs so I share it with you. If you think it is meaningless, you can just close this issue.

Hi, this particular case could be handled better (as in having a more controlled failure mode), but should still result in a compilation error.

/opt/cheerp/bin/clang random.c -cheerp-strict-linking=error

will point you to the missing definitions, like:

error: symbol not defined d
error: symbol not defined f
LLVM ERROR: Strict linking enabled and undefined symbols found
// Plus still actual crash

Other command line option is -cheerp-strict-linking=warning that would only emit those as warning.

The reasoning behind being more lax with undefined symbols is that as long as they can be compiled away, it might still be of use to have them fail as late as possible.

I think in this particular case we, the development team, are aware of the problem, and won't be fixed in the short term, so I am inclined to simply close this issue.

Thanks again for quick respond !