Commit 72ade5f
Zero-initialize hart_t using calloc
Uninitialized hart_t fields may lead to undefined behavior or startup
exceptions. This change replaces malloc with calloc to ensure that
all fields are zeroed upon allocation, providing a safer and more
consistent initialization.
Co-authored-by: Po-Ying Chiu <charlie910417@gmail.com>
Reported-by: @testriscv1 parent 430b960 commit 72ade5f
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
654 | 658 | | |
655 | 659 | | |
656 | 660 | | |
| |||
0 commit comments