-
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.
cg: lift restriction of 1st arg to bcopy() not being alloca
The documentation states that the source address is not allowed to be within the scratch memory region, but the legacy implementation does not actually enforce that restriction, nor does it seem necessary. This patch also moves bcopy tests into their own directory. Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com> Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
- Loading branch information
Showing
25 changed files
with
78 additions
and
56 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
File renamed without changes.
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,4 @@ | ||
-- @@stderr -- | ||
dtrace: failed to compile script test/unittest/funcs/bcopy/err.badbcopy.d: line 26: bcopy( ) argument #2 is incompatible with prototype: | ||
prototype: alloca pointer | ||
argument: non-alloca pointer |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,4 @@ | ||
-- @@stderr -- | ||
dtrace: failed to compile script test/unittest/funcs/bcopy/err.badbcopy2.d: line 25: bcopy( ) argument #2 is incompatible with prototype: | ||
prototype: alloca pointer | ||
argument: non-alloca pointer |
File renamed without changes.
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,4 @@ | ||
-- @@stderr -- | ||
dtrace: failed to compile script test/unittest/funcs/bcopy/err.badbcopy3.d: line 22: bcopy( ) argument #2 is incompatible with prototype: | ||
prototype: alloca pointer | ||
argument: non-alloca pointer |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
/* | ||
* Oracle Linux DTrace. | ||
* Copyright (c) 2023, 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: bcopy from an alloca pointer is subject to size checks | ||
* | ||
* SECTION: Actions and Subroutines/alloca(); | ||
* Actions and Subroutines/bcopy() | ||
*/ | ||
|
||
#pragma D option quiet | ||
|
||
BEGIN | ||
{ | ||
d = alloca(20); | ||
s = alloca(10); | ||
bcopy(s, d, 20); | ||
exit(0); | ||
} | ||
|
||
ERROR | ||
{ | ||
exit(1); | ||
} |
File renamed without changes.
File renamed without changes.
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,3 @@ | ||
|
||
-- @@stderr -- | ||
dtrace: error on enabled probe ID 3 (ID 1: dtrace:::BEGIN): invalid size ({ptr}) in action #1 at BPF pc NNN |
File renamed without changes.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.