-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit cd179d3 ("Ensure proper validation checks are done before freeing a tstring") was supposed to have included a test. Add it. Signed-off-by: Eugene Loh <eugene.loh@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Oracle Linux DTrace. | ||
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. | ||
* Licensed under the Universal Permissive License v 1.0 as shown at | ||
* http://oss.oracle.com/licenses/upl. | ||
*/ | ||
|
||
/* | ||
* Stress test some tstring-free cases. | ||
*/ | ||
|
||
#pragma D option quiet | ||
|
||
BEGIN { | ||
trace( | ||
(x = strjoin("abc", "def")) == | ||
(y = strjoin("abc", "def")) ? 0 : 1); | ||
trace(strjoin( | ||
(x = strjoin("abc", "def")), | ||
(y = strjoin("ABC", "DEF")))); | ||
trace(substr( | ||
(x = strjoin("123", "456")), | ||
2)); | ||
trace(x = strjoin("abc", "def")); | ||
trace(x = | ||
(y = strjoin("ABC", "DEF"))); | ||
|
||
exit(0); | ||
} |
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 @@ | ||
0abcdefABCDEF3456abcdefABCDEF |