Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commitdac3535
committed
Attempt 2 - Fix Missing Git Executable Causing ClusterFuzz Crash
This is a second attempt at#1906 and should resolve:-#1905-google/oss-fuzz#10600PR#1906 had the right idea but wrong implementation, and the differences betweenthe ClusterFuzz image that it was supposed to fix and the OSS-Fuzz image wherethe fix was tested led to the issue not being fully resolved.The root cause of the issue is the same: A Git executable is not globallyavailable in the ClusterFuzz container environment where OSS-Fuzz executesfuzz tests.#1906 attempted to fix the issue by bundling the Git binary and usingGitPython's `git.refresh(<full-path-to-git-executable>)` method to set itinside the `TestOneInput` function of the test harness.However, GitPython attempts to set the binary at import time via its `__init__`hook, and crashes the test if no executable is found during the import.This issue is fixed here by setting the environment variable that GitPythonlooks in before importing it, so it's available for the import. This was testedby setting the `$PATH` to an empty string inside the test files, whichreproduced the crash, then adding the changes introduced here with `$PATH` stillempty, which avoided the crash indicating that the bundled Git executable isworking as expected.1 parent82bb3bb commitdac3535
2 files changed
+8
-8
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 |
| |
27 | 31 |
| |
28 | 32 |
| |
29 | 33 |
| |
30 | 34 |
| |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 |
| |
27 | 31 |
| |
28 | 32 |
| |
29 | 33 |
| |
30 | 34 |
| |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
|
0 commit comments
Comments
(0)