-
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.
The copyin() function was returning the resolved alloca pointer rather than the offset into scratchmem (as it should have). Now that the function is correctly marked as returning an alloca-pointer, it needs to return the native representation of an alloca-pointer, i.e. as an offset into scratchmem. Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com> Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
- Loading branch information
Showing
2 changed files
with
39 additions
and
4 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,31 @@ | ||
/* | ||
* Oracle Linux DTrace. | ||
* Copyright (c) 2022, 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. | ||
*/ | ||
|
||
/* | ||
* ASSERTION: Ensure the alloca()'d pointer return value of copyin() is valid. | ||
* | ||
* SECTION: Actions and Subroutines/copyin() | ||
*/ | ||
|
||
#pragma D option quiet | ||
#pragma D option destructive | ||
|
||
BEGIN | ||
{ | ||
system("echo dtrace-copyin-test"); | ||
} | ||
|
||
syscall::write:entry | ||
{ | ||
((uint8_t *)copyin(arg1, 32))[0]; | ||
exit(0); | ||
} | ||
|
||
ERROR | ||
{ | ||
exit(1); | ||
} |