-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc00339
commit af1a36f
Showing
18 changed files
with
749 additions
and
585 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
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
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 |
---|---|---|
@@ -1,45 +1,24 @@ | ||
--TEST-- | ||
Number of frames can be configured with DD_APPSEC_MAX_STACK_TRACE_DEPTH | ||
By default DD_APPSEC_MAX_STACK_TRACE_DEPTH is 32 | ||
--INI-- | ||
extension=ddtrace.so | ||
--ENV-- | ||
DD_APPSEC_MAX_STACK_TRACE_DEPTH=1 | ||
--FILE-- | ||
<?php | ||
|
||
use function datadog\appsec\testing\generate_backtrace; | ||
|
||
function two($param01, $param02) | ||
function recursive_function($limit) | ||
{ | ||
var_dump(generate_backtrace("some id")); | ||
} | ||
if (--$limit == 0) { | ||
var_dump(count(generate_backtrace("some id")["frames"])); | ||
return; | ||
} | ||
|
||
function one($param01) | ||
{ | ||
two($param01, "other"); | ||
recursive_function($limit); | ||
} | ||
|
||
one("foo"); | ||
recursive_function(40); | ||
|
||
?> | ||
--EXPECTF-- | ||
array(3) { | ||
["language"]=> | ||
string(3) "php" | ||
["id"]=> | ||
string(7) "some id" | ||
["frames"]=> | ||
array(1) { | ||
[0]=> | ||
array(4) { | ||
["line"]=> | ||
int(15) | ||
["function"]=> | ||
string(3) "one" | ||
["file"]=> | ||
string(25) "generate_backtrace_03.php" | ||
["id"]=> | ||
int(1) | ||
} | ||
} | ||
} | ||
int(32) |
Oops, something went wrong.