1425bb815Sopenharmony_ci---
2425bb815Sopenharmony_ciname: Bug report
3425bb815Sopenharmony_ciabout: Create a report to help us improve
4425bb815Sopenharmony_ci
5425bb815Sopenharmony_ci---
6425bb815Sopenharmony_ci
7425bb815Sopenharmony_ciFirst of all, when reporting a bug, give the issue a descriptive title.
8425bb815Sopenharmony_ci
9425bb815Sopenharmony_ciIn the body of the issue, optionally give a free-form text description of the
10425bb815Sopenharmony_cibug. Give the context necessary for others to understand the problem.
11425bb815Sopenharmony_ci
12425bb815Sopenharmony_ciThen, provide information necessary to reproduce the bug.
13425bb815Sopenharmony_ciOmit sections that are irrelevant for the bug report, but note that information
14425bb815Sopenharmony_cilike git revision, build platform, build command, and test case are required in
15425bb815Sopenharmony_cialmost all cases.
16425bb815Sopenharmony_ci
17425bb815Sopenharmony_ci###### JerryScript revision
18425bb815Sopenharmony_ciIdentify the git hash(es) or tag(s) where the issue was observed.
19425bb815Sopenharmony_ci
20425bb815Sopenharmony_ci###### Build platform
21425bb815Sopenharmony_ciName the build platform. E.g., copy the output of
22425bb815Sopenharmony_ci`echo "$(lsb_release -ds) ($(uname -mrs))"` (on Linux),
23425bb815Sopenharmony_ci`echo "$(sw_vers -productName) $(sw_vers -productVersion) ($(uname -mrs))"` (on macOS), or
24425bb815Sopenharmony_ci`python -c "import platform; print(platform.platform())"` (should work everywhere).
25425bb815Sopenharmony_ci
26425bb815Sopenharmony_ci###### Build steps
27425bb815Sopenharmony_ciDescribe how to build JerryScript. Give all the necessary details of the build
28425bb815Sopenharmony_ci(e.g., environment variables, command(s), profile, command line options, etc.).
29425bb815Sopenharmony_ci
30425bb815Sopenharmony_ciE.g.:
31425bb815Sopenharmony_ci```sh
32425bb815Sopenharmony_citools/build.py --clean --debug
33425bb815Sopenharmony_ci```
34425bb815Sopenharmony_ciOr:
35425bb815Sopenharmony_ci```sh
36425bb815Sopenharmony_cimkdir build && cmake -H. -Bbuild && make -C build
37425bb815Sopenharmony_ci```
38425bb815Sopenharmony_ci
39425bb815Sopenharmony_ciEven if the bug was originally observed when JerryScript was integrated into a
40425bb815Sopenharmony_cilarger project, try to reproduce it with as few external code as possible,
41425bb815Sopenharmony_cipreferably by building the `jerry` command line tool.
42425bb815Sopenharmony_ci
43425bb815Sopenharmony_ci###### Build log
44425bb815Sopenharmony_ciCopy the build log if the reported issue is a build problem. Do a verbose build
45425bb815Sopenharmony_ciif necessary. Try and trim the log to relevant parts.
46425bb815Sopenharmony_ci
47425bb815Sopenharmony_ci###### Test case
48425bb815Sopenharmony_ciGive the JavaScript input that should be passed to the engine to trigger the
49425bb815Sopenharmony_cibug. Try and post a reduced test case that is minimally necessary to reproduce
50425bb815Sopenharmony_cithe issue. As a rule of thumb, use Markdown's fenced code block syntax for the
51425bb815Sopenharmony_citest case. Attach the file (renamed to .txt) if the test case contains
52425bb815Sopenharmony_ci'problematic' bytes that cannot be copied in the bug report directly.
53425bb815Sopenharmony_ci
54425bb815Sopenharmony_ci###### Execution platform
55425bb815Sopenharmony_ciUnnecessary if the same as the build platform.
56425bb815Sopenharmony_ci
57425bb815Sopenharmony_ci###### Execution steps
58425bb815Sopenharmony_ciList the steps that trigger the bug.
59425bb815Sopenharmony_ci
60425bb815Sopenharmony_ciE.g., if a bug is snapshot-specific:
61425bb815Sopenharmony_ci```sh
62425bb815Sopenharmony_cibuild/bin/jerry-snapshot generate -o testcase.js.snapshot testcase.js
63425bb815Sopenharmony_cibuild/bin/jerry --exec-snapshot testcase.js.snapshot
64425bb815Sopenharmony_ci```
65425bb815Sopenharmony_ci
66425bb815Sopenharmony_ciUnnecessary if trivial (i.e., `build/bin/jerry testcase.js`).
67425bb815Sopenharmony_ci
68425bb815Sopenharmony_ci###### Output
69425bb815Sopenharmony_ciCopy relevant output from the standard output and/or error channels.
70425bb815Sopenharmony_ci
71425bb815Sopenharmony_ci###### Backtrace
72425bb815Sopenharmony_ciIn case of a crash (assertion failure, etc.), try to copy the backtrace from a
73425bb815Sopenharmony_cidebugger at the point of failure.
74425bb815Sopenharmony_ci
75425bb815Sopenharmony_ci###### Expected behavior
76425bb815Sopenharmony_ciDescribe what should happen instead of current behavior. Unnecessary if trivial
77425bb815Sopenharmony_ci(e.g., in case of a crash, the trivial expected behavior is not to crash).
78