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
#1560 was supposed to fix this, but looks like I somehow missed some calls still. I'll look into this.
More broadly, this is in the flavor of #38. It's not sustainable for us to reimplement every typecheck that the compiler does in Goblint itself. But I'm also surprised that CIL has no problem with this (or have we disabled some warnings?) because it does the typechecking to insert implicit casts as explicit, etc.
Our library function specifications have the number of arguments, but not their types. It's also possible to call such functions with the right number of arguments of wrong types (e.g. in the wrong order). This wouldn't even crash in LibraryFunctions but somewhere down the line in analyses. I don't think LibraryFunctions should also include types, if anything, CIL knows them and could warn about them.
Then this crash no longer happens and the analysis finishes with
[Warning][Unsound][Call][CWE-685] Potential call to function pthread_create with wrong number of arguments (expected: 4, actual: 1). This call will be ignored. (foo.c:12:3-12:24)
[Warning][Unsound][Call] No suitable function to be called at call site. Continuing with state before call. (foo.c:12:3-12:24)
For the --- admittedly incorrect --- program:
we produce the error message
We should instead maybe produce some warning detailing that we failed because the arguments of
pthread_create
are strange.The text was updated successfully, but these errors were encountered: