ROCm / omnitrace

Omnitrace: Application Profiling, Tracing, and Analysis
https://rocm.docs.amd.com/projects/omnitrace/en/latest/
MIT License
301 stars 27 forks source link

Escape the arguments to be executed via eval #410

Closed HollowMan6 closed 2 weeks ago

HollowMan6 commented 1 month ago

Refer to https://stackoverflow.com/a/50367671

As eval builtin interprets its arguments in the same way as shell would do, which would need some escape work, otherwise, it won't work if the input arguments contains e.g. a JSON string:

omnitrace-python -- ./test.py --json='{"foo": "bar"}'