Skip to content
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

Recognize int3 instructions in trace parser #263

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Xyene
Copy link
Member

@Xyene Xyene commented Nov 14, 2022

Not quite sure why we'd be seeing this, but let's not crash when we do. For now, treat a software interrupt as a jump.

Ref #257

@Xyene Xyene marked this pull request as ready for review November 14, 2022 01:48
@Xyene Xyene requested a review from cgaebel November 14, 2022 01:48
@Xyene
Copy link
Member Author

Xyene commented Nov 14, 2022

@dqminh, could you give this a try? If you don't want to build from source, you can grab a prebuilt binary from https://github.com/janestreet/magic-trace/actions/runs/3458003129

Not quite sure why we'd be seeing this, but let's not crash when we do.
For now, treat a software interrupt as a jump.

Ref janestreet#257
@pikrzysztof
Copy link

Can you please rebuild the artifacts? I'd like to give it a try but I can't build the project (i'm trying to build the master version with your patch on top of it)

~/others/magic-trace magic-trace 16:48:58 RC=0» make
dune build 
File "lib/magic_trace/src/dune", line 7, characters 17-45:
7 |  (libraries core core_unix.time_stamp_counter)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "core_unix.time_stamp_counter" not found.
-> required by library "magic-trace.magic_trace" in
   _build/default/lib/magic_trace/src
-> required by _build/default/META.magic-trace
-> required by alias all
-> required by alias default
File "core/dune", line 5, characters 23-31:
5 |    magic_trace owee re angstrom)
                           ^^^^^^^^
Error: Library "angstrom" not found.
-> required by library "magic-trace.magic_trace_core" in _build/default/core
-> required by _build/default/META.magic-trace
-> required by alias all
-> required by alias default
File "src/dune", line 19, characters 51-72:
19 |    core_unix.sys_unix cohttp cohttp_static_handler core_unix.signal_unix
                                                        ^^^^^^^^^^^^^^^^^^^^^
Error: Library "core_unix.signal_unix" not found.
-> required by library "magic-trace.magic_trace_lib" in _build/default/src
-> required by _build/default/META.magic-trace
-> required by alias all
-> required by alias default
File "test/sample-targets/long-running/dune", line 4, characters 38-66:
4 |    magic_trace core_unix.time_ns_unix core_unix.time_stamp_counter)
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "core_unix.time_stamp_counter" not found.
-> required by
   _build/default/test/sample-targets/long-running/long_running.exe
-> required by alias test/sample-targets/long-running/all
-> required by alias default
File "test/sample-targets/ocaml-raise/dune", line 4, characters 3-31:
4 |    core_unix.time_stamp_counter)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "core_unix.time_stamp_counter" not found.
-> required by _build/default/test/sample-targets/ocaml-raise/sample.exe
-> required by alias test/sample-targets/ocaml-raise/all
-> required by alias default
File "test/sample-targets/variable-duration/dune", line 3, characters 27-43:
3 |  (libraries core core_unix ocaml_intrinsics magic_trace)
                               ^^^^^^^^^^^^^^^^
Error: Library "ocaml_intrinsics" not found.
-> required by
   _build/default/test/sample-targets/variable-duration/variable_duration.exe
-> required by alias test/sample-targets/variable-duration/all
-> required by alias default
File "test/sample-targets/long-running/dune", line 6, characters 7-15:
6 |   (pps ppx_jane)))
           ^^^^^^^^
Error: Library "ppx_jane" not found.
-> required by
   _build/default/test/sample-targets/long-running/long_running.pp.ml
-> required by alias test/sample-targets/long-running/all
-> required by alias default
File "test/sample-targets/ocaml-raise/dune", line 6, characters 7-15:
6 |   (pps ppx_jane)))
           ^^^^^^^^
Error: Library "ppx_jane" not found.
-> required by _build/default/test/sample-targets/ocaml-raise/sample.pp.ml
-> required by alias test/sample-targets/ocaml-raise/all
-> required by alias default
File "test/sample-targets/variable-duration/dune", line 5, characters 7-15:
5 |   (pps ppx_jane)))
           ^^^^^^^^
Error: Library "ppx_jane" not found.
-> required by
   _build/default/test/sample-targets/variable-duration/variable_duration.pp.ml
-> required by alias test/sample-targets/variable-duration/all
-> required by alias default
File "bin/dune", line 4, characters 33-55:    
4 |  (libraries core magic_trace_lib core_unix.command_unix)
                                     ^^^^^^^^^^^^^^^^^^^^^^
Error: Library "core_unix.command_unix" not found.
-> required by _build/default/bin/magic_trace_bin.exe
-> required by alias bin/all
-> required by alias default
File "bin/dune", line 9, characters 7-15:     
9 |   (pps ppx_jane)))
           ^^^^^^^^
Error: Library "ppx_jane" not found.
-> required by _build/default/bin/magic_trace_bin.pp.ml
-> required by alias bin/all
-> required by alias default
File "core/dune", line 8, characters 7-15:       
8 |   (pps ppx_jane)))
           ^^^^^^^^
Error: Library "ppx_jane" not found.
-> required by _build/default/core/backend_intf.pp.ml
-> required by alias core/all
-> required by alias default
File "test/dune", line 7, characters 7-15:       
7 |   (pps ppx_jane)))
           ^^^^^^^^
Error: Library "ppx_jane" not found.
-> required by _build/default/test/c_demo_sampling.pp.ml
-> required by alias test/all
-> required by alias default
File "src/dune", line 23, characters 7-15:       
23 |   (pps ppx_jane)))
            ^^^^^^^^
Error: Library "ppx_jane" not found.
-> required by _build/default/src/boot_time.pp.ml
-> required by alias src/all
-> required by alias default
File "direct_backend/cinaps/dune", line 5, characters 7-15:
5 |   (pps ppx_jane)))
           ^^^^^^^^
Error: Library "ppx_jane" not found.
-> required by
   _build/default/direct_backend/cinaps/trace_decoding_interop.pp.ml
-> required by alias direct_backend/cinaps/all
-> required by alias default
File "lib/magic_trace/src/dune", line 9, characters 7-15:
9 |   (pps ppx_jane)))
           ^^^^^^^^
Error: Library "ppx_jane" not found.
-> required by _build/default/lib/magic_trace/src/import.pp.ml
-> required by alias lib/magic_trace/src/all
-> required by alias default
File "lib/magic_trace/test/dune", line 5, characters 7-15:
5 |   (pps ppx_jane)))
           ^^^^^^^^
Error: Library "ppx_jane" not found.
-> required by _build/default/lib/magic_trace/test/import.pp.ml
-> required by alias lib/magic_trace/test/all
-> required by alias default
File "test/dune", line 4, characters 48-73:      
4 |  (libraries async core expect_test_helpers_core expect_test_helpers_async
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "expect_test_helpers_async" not found.
-> required by library "magic_trace_app_test" in _build/default/test
-> required by
   _build/default/test/.magic_trace_app_test.objs/byte/magic_trace_app_test__C_demo_sampling.cmo
-> required by _build/default/test/magic_trace_app_test.cma
-> required by alias test/all
-> required by alias default
File "direct_backend/cinaps/dune", line 3, characters 12-16:
3 |  (libraries core)
                ^^^^
Error: Library "core" not found.
-> required by library "magic_trace_lib_cinaps_helpers" in
   _build/default/direct_backend/cinaps
-> required by
   _build/default/direct_backend/cinaps/.magic_trace_lib_cinaps_helpers.objs/byte/magic_trace_lib_cinaps_helpers__Trace_decoding_interop.cmo
-> required by
   _build/default/direct_backend/cinaps/magic_trace_lib_cinaps_helpers.cma
-> required by alias direct_backend/cinaps/all
-> required by alias default
File "lib/magic_trace/test/dune", line 3, characters 17-41:
3 |  (libraries core expect_test_helpers_core magic_trace)
                     ^^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "expect_test_helpers_core" not found.
-> required by library "magic_trace_test" in
   _build/default/lib/magic_trace/test
-> required by
   _build/default/lib/magic_trace/test/.magic_trace_test.objs/byte/magic_trace_test__Import.cmo
-> required by _build/default/lib/magic_trace/test/magic_trace_test.cma
-> required by alias lib/magic_trace/test/all
-> required by alias default
File "src/dune", line 10, characters 8-27:        
10 |    (run %{bin:ocaml-crunch} -m plain dlfilter -o perf_dlfilter.ml))))
             ^^^^^^^^^^^^^^^^^^^
Error: Program ocaml-crunch not found in the tree or in PATH
 (context: default)
make: *** [Makefile:5: default] Error 1            
~/others/magic-trace magic-trace 16:49:01 RC=2» 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants