执行 AGENTS align-linuxcnc 加速规则
结论:补强 WASM interp_base 可执行探针,依据 LinuxCNC src/emc/rs274ngc/interp_base.cc 中绝对解释器路径直接 dlopen、相对路径经 EMC2_HOME/lib/linuxcnc 解析后 dlopen 的分支。验证通过:./test-linuxcnc-wasm-interp-base-link.sh、./test-native.sh、./test-linuxcnc-source-link.sh。
This commit is contained in:
@@ -24,6 +24,15 @@ int main() {
|
|||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
InterpBase *interp = interp_from_shlib("nonexistent-interpreter.so");
|
// LinuxCNC src/emc/rs274ngc/interp_base.cc uses absolute interpreter
|
||||||
return interp == nullptr ? 0 : 1;
|
// paths directly before calling dlopen().
|
||||||
|
if (interp_from_shlib("/tmp/cnc_sim_missing_absolute_interpreter.so") != nullptr) {
|
||||||
|
return 7;
|
||||||
|
}
|
||||||
|
// Relative interpreter names are resolved through EMC2_HOME/lib/linuxcnc
|
||||||
|
// before the same unavailable dynamic-loading edge is reached.
|
||||||
|
if (interp_from_shlib("nonexistent-interpreter.so") != nullptr) {
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user