mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-12 19:55:14 +02:00
[pitboss/grind] deferred session-0015 (20260520T233019Z-6958)
This commit is contained in:
parent
ba0f83a855
commit
1e122b615e
5 changed files with 128 additions and 19 deletions
|
|
@ -173,8 +173,15 @@ fn class_method_java_emits_reflective_dispatch() {
|
|||
fn class_method_go_uses_reflect_receivers_registry() {
|
||||
let spec = make_spec(Lang::Go);
|
||||
let h = lang::emit(&spec).expect("emit ok");
|
||||
assert!(h.source.contains("entry.NyxReceivers"));
|
||||
assert!(h.source.contains("entry.NyxAutoReceivers"));
|
||||
assert!(h.source.contains("MethodByName"));
|
||||
let registry = h
|
||||
.extra_files
|
||||
.iter()
|
||||
.find(|(name, _)| name == "entry/nyx_auto_registry.go")
|
||||
.expect("auto registry emitted");
|
||||
assert!(registry.1.contains("NyxAutoReceivers"));
|
||||
assert!(registry.1.contains("UserService{}"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,3 @@ func (UserService) Run(input string) string {
|
|||
out, _ := exec.Command("/bin/echo", input).Output()
|
||||
return string(out)
|
||||
}
|
||||
|
||||
var NyxReceivers = map[string]interface{}{
|
||||
"UserService": UserService{},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// Phase 19 (Track M.1) — class-method vuln fixture for Go.
|
||||
//
|
||||
// UserService.Run accepts user input and passes it to `sh -c` so the
|
||||
// shell interprets it. The fixture publishes its instance through the
|
||||
// well-known `NyxReceivers` registry the harness uses to construct
|
||||
// receivers reflectively.
|
||||
// shell interprets it. The harness compiles in a generated
|
||||
// `nyx_auto_registry.go` that publishes `UserService{}` so reflection
|
||||
// works without a hand-rolled registry in the fixture.
|
||||
package entry
|
||||
|
||||
import "os/exec"
|
||||
|
|
@ -15,7 +15,3 @@ func (UserService) Run(input string) string {
|
|||
out, _ := exec.Command("sh", "-c", "echo "+input).Output()
|
||||
return string(out)
|
||||
}
|
||||
|
||||
var NyxReceivers = map[string]interface{}{
|
||||
"UserService": UserService{},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue