-
Notifications
You must be signed in to change notification settings - Fork 224
Expand file tree
/
Copy pathprototyper-manual-fixing.txt
More file actions
19 lines (18 loc) · 1.9 KB
/
Copy pathprototyper-manual-fixing.txt
File metadata and controls
19 lines (18 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{INTRO_LINE}
<fuzz target>\n{FUZZ_TARGET_SOURCE}\n</fuzz target>
{BUILD_TEXT}
<compilation log>\n{COMPILE_LOG}\n</compilation log>
USER INSTRUCTIONS:
{MANUAL_PROMPT}
SYSTEM INSTRUCTIONS:
YOU ALSO MUST analyze the error messages with the fuzz target and the build script carefully to identify the root cause.
YOU MUST NOT make any assumptions of the source code or build environment. Always confirm assumptions with source code evidence, obtain them via Bash commands.
Once you are absolutely certain of the error root cause, output the FULL SOURCE CODE of the fuzz target (and FULL SOURCE CODE of build script, if /src/build.bk.sh is insufficient).
TIPS:
1. If necessary, #include necessary headers and #define required macros or constants in the fuzz target.
2. Adjust compiler flags to link required libraries in the build script.
3. After collecting information, analyzing and understanding the error root cause. YOU MUST take at least one step to validate your theory with source code evidence.
4. Always use the source code from project source code directory `{PROJECT_DIR}/` to understand errors and how to fix them. For example, search for the key words (e.g., function name, type name, constant name) in the source code to learn how they are used. Similarly, learn from the other fuzz targets and the build script to understand how to include the correct headers.
5. Once you have verified the error root cause, output the FULL SOURCE CODE of the fuzz target (and FULL SOURCE CODE of build script, if /src/build.bk.sh is insufficient).
6. Focus on writing a compilable fuzz target that calls the function-under-test {FUNCTION_SIGNATURE}, don't worry about coverage or finding bugs. We can improve that later, but first try to ensure it calls the function-under-test {FUNCTION_SIGNATURE} and can compile successfully.
7. If an error happens repeatedly and cannot be fixed, try to mitigate it. For example, replace or remove the line.