This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement matching on the calltrace (#17)
* Implement matching on the calltrace
- Loading branch information
Showing
11 changed files
with
148 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,4 @@ src/Makefile.objects | |
src/missing | ||
src/mkinstalldirs | ||
src/run-tests.php | ||
doc/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sp.disable_functions.function("outer>inner").drop(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
Disable functions by matching the calltrace | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini | ||
--FILE-- | ||
<?php | ||
|
||
function outer() { | ||
function inner() { | ||
echo "I'm in the inner function!\n"; | ||
} | ||
echo "I'm in the outer function, before the call!\n"; | ||
inner(); | ||
echo "I'm in the outer function, after the call!\n"; | ||
} | ||
|
||
echo "I'm before the call to outer\n"; | ||
outer(); | ||
echo "I'm after the call to outer\n"; | ||
?> | ||
--EXPECTF-- | ||
I'm before the call to outer | ||
I'm in the outer function, before the call! | ||
[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'outer>inner' in %a/disabled_functions_chain.php:%d has been disabled. | ||
I'm in the outer function, after the call! | ||
I'm after the call to outer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
Disable functions by matching the calltrace | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
--INI-- | ||
sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini | ||
--FILE-- | ||
<?php | ||
|
||
function outer() { | ||
function inner_() { | ||
echo "I'm in the inner function!\n"; | ||
} | ||
echo "I'm in the outer function, before the call!\n"; | ||
inner_(); | ||
echo "I'm in the outer function, after the call!\n"; | ||
} | ||
|
||
echo "I'm before the call to outer\n"; | ||
outer(); | ||
echo "I'm after the call to outer\n"; | ||
?> | ||
--EXPECTF-- | ||
I'm before the call to outer | ||
I'm in the outer function, before the call! | ||
I'm in the inner function! | ||
I'm in the outer function, after the call! | ||
I'm after the call to outer |