diff options
Diffstat (limited to 'ext/sodium/tests/exception_trace_without_args.phpt')
-rw-r--r-- | ext/sodium/tests/exception_trace_without_args.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/sodium/tests/exception_trace_without_args.phpt b/ext/sodium/tests/exception_trace_without_args.phpt new file mode 100644 index 0000000000..c821df0eb5 --- /dev/null +++ b/ext/sodium/tests/exception_trace_without_args.phpt @@ -0,0 +1,22 @@ +--TEST-- +SodiumException backtraces do not contain function arguments +--SKIPIF-- +<?php if (!extension_loaded("sodium")) print "skip"; ?> +--FILE-- +<?php + +function do_memzero($x) { + sodium_memzero($x); +} + +$x = 42; +do_memzero($x); + +?> +--EXPECTF-- +Fatal error: Uncaught SodiumException: memzero: a PHP string is required in %s:%d +Stack trace: +#0 %s(%d): sodium_memzero() +#1 %s(%d): do_memzero() +#2 {main} + thrown in %s on line %d |