- 
                Notifications
    You must be signed in to change notification settings 
- Fork 314
Fix issue with call sites on constructors without DUP bytecode #9698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 🎯 Code Coverage 🔗 Commit SHA: 34d74cf | Docs | Was this helpful? Give us feedback! | 
| BenchmarksStartupParameters
 See matching parameters
 SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 5 unstable metrics. Startup time reports for insecure-bankgantt
    title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~34d74cfcd4, baseline=1.55.0-SNAPSHOT~85d85805f6
    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.013 s) : 0, 1013234
Total [baseline] (8.671 s) : 0, 8670774
Agent [candidate] (1.025 s) : 0, 1024687
Total [candidate] (8.676 s) : 0, 8676006
section iast
Agent [baseline] (1.149 s) : 0, 1148805
Total [baseline] (9.251 s) : 0, 9251179
Agent [candidate] (1.151 s) : 0, 1151028
Total [candidate] (9.301 s) : 0, 9300591
 
 
 
 gantt
    title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~34d74cfcd4, baseline=1.55.0-SNAPSHOT~85d85805f6
    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.465 ms) : 0, 1465
crashtracking [candidate] (1.465 ms) : 0, 1465
BytebuddyAgent [baseline] (691.01 ms) : 0, 691010
BytebuddyAgent [candidate] (698.437 ms) : 0, 698437
GlobalTracer [baseline] (241.444 ms) : 0, 241444
GlobalTracer [candidate] (243.696 ms) : 0, 243696
AppSec [baseline] (32.321 ms) : 0, 32321
AppSec [candidate] (32.581 ms) : 0, 32581
Debugger [baseline] (6.401 ms) : 0, 6401
Debugger [candidate] (6.536 ms) : 0, 6536
Remote Config [baseline] (702.874 µs) : 0, 703
Remote Config [candidate] (703.033 µs) : 0, 703
Telemetry [baseline] (9.287 ms) : 0, 9287
Telemetry [candidate] (9.38 ms) : 0, 9380
Flare Poller [baseline] (9.522 ms) : 0, 9522
Flare Poller [candidate] (10.613 ms) : 0, 10613
section iast
crashtracking [baseline] (1.481 ms) : 0, 1481
crashtracking [candidate] (1.48 ms) : 0, 1480
BytebuddyAgent [baseline] (814.552 ms) : 0, 814552
BytebuddyAgent [candidate] (815.389 ms) : 0, 815389
GlobalTracer [baseline] (230.498 ms) : 0, 230498
GlobalTracer [candidate] (231.027 ms) : 0, 231027
AppSec [baseline] (35.024 ms) : 0, 35024
AppSec [candidate] (35.335 ms) : 0, 35335
Debugger [baseline] (6.114 ms) : 0, 6114
Debugger [candidate] (6.173 ms) : 0, 6173
Remote Config [baseline] (609.912 µs) : 0, 610
Remote Config [candidate] (612.1 µs) : 0, 612
Telemetry [baseline] (8.56 ms) : 0, 8560
Telemetry [candidate] (8.724 ms) : 0, 8724
Flare Poller [baseline] (4.215 ms) : 0, 4215
Flare Poller [candidate] (4.208 ms) : 0, 4208
IAST [baseline] (26.26 ms) : 0, 26260
IAST [candidate] (26.515 ms) : 0, 26515
Startup time reports for petclinicgantt
    title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~34d74cfcd4, baseline=1.55.0-SNAPSHOT~85d85805f6
    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.025 s) : 0, 1025011
Total [baseline] (10.758 s) : 0, 10758355
Agent [candidate] (1.016 s) : 0, 1015627
Total [candidate] (10.672 s) : 0, 10671766
section appsec
Agent [baseline] (1.194 s) : 0, 1193887
Total [baseline] (11.029 s) : 0, 11029209
Agent [candidate] (1.2 s) : 0, 1199751
Total [candidate] (11.047 s) : 0, 11046905
section iast
Agent [baseline] (1.161 s) : 0, 1161374
Total [baseline] (11.086 s) : 0, 11085676
Agent [candidate] (1.151 s) : 0, 1150612
Total [candidate] (10.999 s) : 0, 10998994
section profiling
Agent [baseline] (1.163 s) : 0, 1163205
Total [baseline] (11.054 s) : 0, 11054300
Agent [candidate] (1.162 s) : 0, 1161685
Total [candidate] (11.071 s) : 0, 11071062
 
 
 
 gantt
    title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~34d74cfcd4, baseline=1.55.0-SNAPSHOT~85d85805f6
    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.473 ms) : 0, 1473
crashtracking [candidate] (1.458 ms) : 0, 1458
BytebuddyAgent [baseline] (698.513 ms) : 0, 698513
BytebuddyAgent [candidate] (692.443 ms) : 0, 692443
GlobalTracer [baseline] (243.352 ms) : 0, 243352
GlobalTracer [candidate] (241.635 ms) : 0, 241635
AppSec [baseline] (32.647 ms) : 0, 32647
AppSec [candidate] (32.247 ms) : 0, 32247
Debugger [baseline] (6.51 ms) : 0, 6510
Debugger [candidate] (6.479 ms) : 0, 6479
Remote Config [baseline] (712.345 µs) : 0, 712
Remote Config [candidate] (706.876 µs) : 0, 707
Telemetry [baseline] (9.394 ms) : 0, 9394
Telemetry [candidate] (9.216 ms) : 0, 9216
Flare Poller [baseline] (11.085 ms) : 0, 11085
Flare Poller [candidate] (10.248 ms) : 0, 10248
section appsec
crashtracking [baseline] (1.444 ms) : 0, 1444
crashtracking [candidate] (1.449 ms) : 0, 1449
BytebuddyAgent [baseline] (717.19 ms) : 0, 717190
BytebuddyAgent [candidate] (718.513 ms) : 0, 718513
GlobalTracer [baseline] (234.522 ms) : 0, 234522
GlobalTracer [candidate] (236.995 ms) : 0, 236995
AppSec [baseline] (175.72 ms) : 0, 175720
AppSec [candidate] (177.036 ms) : 0, 177036
Debugger [baseline] (6.146 ms) : 0, 6146
Debugger [candidate] (6.199 ms) : 0, 6199
Remote Config [baseline] (634.4 µs) : 0, 634
Remote Config [candidate] (637.395 µs) : 0, 637
Telemetry [baseline] (8.397 ms) : 0, 8397
Telemetry [candidate] (8.671 ms) : 0, 8671
Flare Poller [baseline] (3.986 ms) : 0, 3986
Flare Poller [candidate] (3.972 ms) : 0, 3972
IAST [baseline] (24.704 ms) : 0, 24704
IAST [candidate] (25.089 ms) : 0, 25089
section iast
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.453 ms) : 0, 1453
BytebuddyAgent [baseline] (823.267 ms) : 0, 823267
BytebuddyAgent [candidate] (814.978 ms) : 0, 814978
GlobalTracer [baseline] (232.811 ms) : 0, 232811
GlobalTracer [candidate] (231.146 ms) : 0, 231146
AppSec [baseline] (35.596 ms) : 0, 35596
AppSec [candidate] (35.447 ms) : 0, 35447
Debugger [baseline] (6.181 ms) : 0, 6181
Debugger [candidate] (6.104 ms) : 0, 6104
Remote Config [baseline] (624.473 µs) : 0, 624
Remote Config [candidate] (603.378 µs) : 0, 603
Telemetry [baseline] (8.73 ms) : 0, 8730
Telemetry [candidate] (8.595 ms) : 0, 8595
Flare Poller [baseline] (4.222 ms) : 0, 4222
Flare Poller [candidate] (4.203 ms) : 0, 4203
IAST [baseline] (26.786 ms) : 0, 26786
IAST [candidate] (26.439 ms) : 0, 26439
section profiling
crashtracking [baseline] (1.444 ms) : 0, 1444
crashtracking [candidate] (1.434 ms) : 0, 1434
BytebuddyAgent [baseline] (721.86 ms) : 0, 721860
BytebuddyAgent [candidate] (721.523 ms) : 0, 721523
GlobalTracer [baseline] (218.098 ms) : 0, 218098
GlobalTracer [candidate] (217.307 ms) : 0, 217307
AppSec [baseline] (32.434 ms) : 0, 32434
AppSec [candidate] (32.199 ms) : 0, 32199
Debugger [baseline] (6.519 ms) : 0, 6519
Debugger [candidate] (7.29 ms) : 0, 7290
Remote Config [baseline] (832.905 µs) : 0, 833
Remote Config [candidate] (744.538 µs) : 0, 745
Telemetry [baseline] (15.91 ms) : 0, 15910
Telemetry [candidate] (15.251 ms) : 0, 15251
Flare Poller [baseline] (4.172 ms) : 0, 4172
Flare Poller [candidate] (4.143 ms) : 0, 4143
ProfilingAgent [baseline] (108.853 ms) : 0, 108853
ProfilingAgent [candidate] (107.883 ms) : 0, 107883
Profiling [baseline] (109.836 ms) : 0, 109836
Profiling [candidate] (109.674 ms) : 0, 109674
LoadParameters
 See matching parameters
 SummaryFound 2 performance improvements and 1 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics. 
 Request duration reports for petclinicgantt
    title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~34d74cfcd4, baseline=1.55.0-SNAPSHOT~85d85805f6
    dateFormat X
    axisFormat %s
section baseline
no_agent (36.57 ms) : 36275, 36866
.   : milestone, 36570,
appsec (48.033 ms) : 47605, 48462
.   : milestone, 48033,
code_origins (43.99 ms) : 43613, 44366
.   : milestone, 43990,
iast (44.524 ms) : 44126, 44921
.   : milestone, 44524,
profiling (49.43 ms) : 48954, 49905
.   : milestone, 49430,
tracing (41.833 ms) : 41480, 42186
.   : milestone, 41833,
section candidate
no_agent (38.465 ms) : 38158, 38771
.   : milestone, 38465,
appsec (46.631 ms) : 46221, 47041
.   : milestone, 46631,
code_origins (43.924 ms) : 43537, 44311
.   : milestone, 43924,
iast (45.363 ms) : 44985, 45740
.   : milestone, 45363,
profiling (47.282 ms) : 46863, 47700
.   : milestone, 47282,
tracing (42.578 ms) : 42215, 42942
.   : milestone, 42578,
 
 
 
 Request duration reports for insecure-bankgantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~34d74cfcd4, baseline=1.55.0-SNAPSHOT~85d85805f6
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.627 ms) : 4566, 4688
.   : milestone, 4627,
iast (9.983 ms) : 9812, 10155
.   : milestone, 9983,
iast_FULL (14.998 ms) : 14693, 15303
.   : milestone, 14998,
iast_GLOBAL (10.709 ms) : 10517, 10902
.   : milestone, 10709,
profiling (8.921 ms) : 8774, 9069
.   : milestone, 8921,
tracing (7.527 ms) : 7415, 7640
.   : milestone, 7527,
section candidate
no_agent (4.537 ms) : 4487, 4586
.   : milestone, 4537,
iast (9.66 ms) : 9494, 9825
.   : milestone, 9660,
iast_FULL (14.062 ms) : 13782, 14342
.   : milestone, 14062,
iast_GLOBAL (10.832 ms) : 10641, 11023
.   : milestone, 10832,
profiling (8.926 ms) : 8787, 9064
.   : milestone, 8926,
tracing (7.578 ms) : 7467, 7689
.   : milestone, 7578,
 
 
 
 DacapoParameters
 See matching parameters
 SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
    title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~34d74cfcd4, baseline=1.55.0-SNAPSHOT~85d85805f6
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.477 ms) : 1466, 1489
.   : milestone, 1477,
appsec (3.737 ms) : 3518, 3956
.   : milestone, 3737,
iast (2.207 ms) : 2144, 2270
.   : milestone, 2207,
iast_GLOBAL (2.251 ms) : 2188, 2315
.   : milestone, 2251,
profiling (2.074 ms) : 2022, 2127
.   : milestone, 2074,
tracing (2.027 ms) : 1978, 2077
.   : milestone, 2027,
section candidate
no_agent (1.478 ms) : 1466, 1489
.   : milestone, 1478,
appsec (3.711 ms) : 3493, 3930
.   : milestone, 3711,
iast (2.211 ms) : 2148, 2275
.   : milestone, 2211,
iast_GLOBAL (2.251 ms) : 2188, 2315
.   : milestone, 2251,
profiling (2.057 ms) : 2006, 2108
.   : milestone, 2057,
tracing (2.018 ms) : 1969, 2067
.   : milestone, 2018,
 
 
 
 Execution time for biojavagantt
    title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~34d74cfcd4, baseline=1.55.0-SNAPSHOT~85d85805f6
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.857 s) : 14857000, 14857000
.   : milestone, 14857000,
appsec (15.183 s) : 15183000, 15183000
.   : milestone, 15183000,
iast (18.909 s) : 18909000, 18909000
.   : milestone, 18909000,
iast_GLOBAL (18.244 s) : 18244000, 18244000
.   : milestone, 18244000,
profiling (15.494 s) : 15494000, 15494000
.   : milestone, 15494000,
tracing (15.046 s) : 15046000, 15046000
.   : milestone, 15046000,
section candidate
no_agent (14.763 s) : 14763000, 14763000
.   : milestone, 14763000,
appsec (14.952 s) : 14952000, 14952000
.   : milestone, 14952000,
iast (18.212 s) : 18212000, 18212000
.   : milestone, 18212000,
iast_GLOBAL (18.069 s) : 18069000, 18069000
.   : milestone, 18069000,
profiling (15.195 s) : 15195000, 15195000
.   : milestone, 15195000,
tracing (14.897 s) : 14897000, 14897000
.   : milestone, 14897000,
 
 
 
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
8a8fdc8    to
    34d74cf      
    Compare
  
    
What Does This Do
Ignores constructor call sites when there is no corresponding
DUPinstruction following aNEW. This can occur when the created instance is immediately discarded and never used in the code.Motivation
We've received an escalation related to a verification error:
The issue is caused by stack manipulation operations performed by IAST when applying call site advices. In the case of constructors, the instrumentation expects a
DUPinstruction to follow theNEWoperation. However, in this particular instance, the bytecode sequence was:Since the created instance is immediately discarded by the Java code, we can safely ignore these call sites.
Additional Notes
As a future improvement, we could revisit this logic and explore applying call site advices to this case as well.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: APMS-17315