You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Printing is not thread-safe. Relevant once #123 is merged.
To Reproduce
# run this command in a loop until error with some rule, in the opengrep repo: ## opengrep-cli --experimental --timeout 5 --max-memory 5000 -j 8 -c <some-rule>.yaml src/ libs/
$ n=0;whiletime opengrep-cli scan --experimental --timeout 5 --max-memory 5000 -j 8 -c <some-rule>.yaml src/ libs/ 2>>(tee /dev/stderr | grep -q "ERROR"&&exit 1);do((n++));done;echo"failed after $((n+1)) attempts"
[01.62][ERROR]: Error: exception Invalid_argument: String.sub / Bytes.sub
Raised at Stdlib.invalid_arg in file "stdlib.ml", line 30, characters 20-45
Called from Stdlib__String.sub in file "string.ml" (inlined), line 43, characters 2-23
Called from Str.string_after in file "str.ml" (inlined), line 24, characters 23-59
Called from Matches_report.cut in file "src/osemgrep/reporting/Matches_report.ml", line 176, characters 4-27
Called from Matches_report.pp_finding.(fun) in file "src/osemgrep/reporting/Matches_report.ml", line 244, characters 25-55
Called from Stdlib__List.fold_left in file "list.ml", line 123, characters 24-34
Called from Matches_report.pp_finding in file "src/osemgrep/reporting/Matches_report.ml", lines 198-250, characters 4-28
Called from Matches_report.pp_text_outputs.print_one_match in file "src/osemgrep/reporting/Matches_report.ml", lines 379-381, characters 4-13
Called from List_.iter_with_view_into_neighbor_elements.loop in file "libs/commons/List_.ml", line 134, characters 8-28
Called from Stdlib__List.iter in file "list.ml", line 112, characters 12-15
Called from Output.output_result in file "src/osemgrep/reporting/Output.ml", line 253, characters 2-71
Called from Scan_subcommand.check_targets_with_rules in file "src/osemgrep/cli_scan/Scan_subcommand.ml", lines 660-663, characters 12-41
Called from Scan_subcommand.run_scan_conf in file "src/osemgrep/cli_scan/Scan_subcommand.ml", lines 805-813, characters 8-61
Called from CLI.dispatch_subcommand in file "src/osemgrep/cli/CLI.ml", line 196, characters 20-57
Called from CLI.safe_run in file "src/osemgrep/cli/CLI.ml", line 228, characters 8-12
opengrep-cli --experimental --timeout 5 --max-memory 5000 -j 8 -c ... src/ libs/ 5.03s user 1.28s system 382% cpu 1.650 total
failed after 5101 attempts
What is the priority of the bug to you?
P0: blocking your adoption of Opengrep or workflow
P1: important to fix or quite annoying
P2: regular bug that should get fixed
The text was updated successfully, but these errors were encountered:
Describe the bug
Printing is not thread-safe. Relevant once #123 is merged.
To Reproduce
What is the priority of the bug to you?
The text was updated successfully, but these errors were encountered: