Skip to content

Commit 278824b

Browse files
committed
fix other.test_dangerous_func_cast
1 parent 2b18f2b commit 278824b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_other.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,10 @@ def test(args, expected, err_expected=None):
604604
# fastcomp. all asm, so it can't just work with wrong sigs. but, ASSERTIONS=2 gives much better info to debug
605605
test(['-O1'], 'If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.') # no useful info, but does mention ASSERTIONS
606606
test(['-O1', '-s', 'ASSERTIONS=1'], '''Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)
607-
Builwith ASSERTIONS=2 for more info.
607+
Build with ASSERTIONS=2 for more info.
608608
''') # some useful text
609609
test(['-O1', '-s', 'ASSERTIONS=2'], '''Invalid function pointer '0' called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)
610-
Thisointer might make sense in another type signature: i: 0
610+
This pointer might make sense in another type signature: i: 0
611611
''') # actually useful identity of the bad pointer, with comparisons to what it would be in other types/tables
612612
test(['-O1', '-s', 'EMULATE_FUNCTION_POINTER_CASTS=1'], '''my func\n''') # emulate so it works
613613

0 commit comments

Comments
 (0)