Commit 0a80cc4
authored
Fix wasm loader check data segment count (#3492)
When datacount section exists, loader will check whether the data count
read from data segment section is same with the data count read from
datacount section, but the value of latter can be 0, loader should not
skip the check when the latter is 0. This fixes #3491.
And fix handle_name_section return value not checked issue and early
return true issue after handle_name_section.
And also add the failed case in #3491 to ba-issues.1 parent 082cfa1 commit 0a80cc4
File tree
4 files changed
+53
-13
lines changed- core/iwasm/interpreter
- tests/regression/ba-issues
- issues/issue-3491
4 files changed
+53
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4716 | 4716 | | |
4717 | 4717 | | |
4718 | 4718 | | |
4719 | | - | |
4720 | | - | |
| 4719 | + | |
| 4720 | + | |
| 4721 | + | |
| 4722 | + | |
| 4723 | + | |
| 4724 | + | |
4721 | 4725 | | |
4722 | 4726 | | |
4723 | 4727 | | |
| |||
4733 | 4737 | | |
4734 | 4738 | | |
4735 | 4739 | | |
4736 | | - | |
4737 | | - | |
| 4740 | + | |
4738 | 4741 | | |
4739 | 4742 | | |
4740 | 4743 | | |
| |||
5242 | 5245 | | |
5243 | 5246 | | |
5244 | 5247 | | |
5245 | | - | |
5246 | | - | |
| 5248 | + | |
| 5249 | + | |
| 5250 | + | |
| 5251 | + | |
5247 | 5252 | | |
5248 | | - | |
5249 | 5253 | | |
5250 | 5254 | | |
5251 | 5255 | | |
| |||
5789 | 5793 | | |
5790 | 5794 | | |
5791 | 5795 | | |
| 5796 | + | |
| 5797 | + | |
| 5798 | + | |
5792 | 5799 | | |
5793 | 5800 | | |
5794 | 5801 | | |
| |||
5881 | 5888 | | |
5882 | 5889 | | |
5883 | 5890 | | |
| 5891 | + | |
| 5892 | + | |
| 5893 | + | |
5884 | 5894 | | |
5885 | 5895 | | |
5886 | 5896 | | |
| |||
5890 | 5900 | | |
5891 | 5901 | | |
5892 | 5902 | | |
| 5903 | + | |
5893 | 5904 | | |
5894 | 5905 | | |
5895 | 5906 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1740 | 1740 | | |
1741 | 1741 | | |
1742 | 1742 | | |
1743 | | - | |
1744 | | - | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
1745 | 1749 | | |
1746 | 1750 | | |
1747 | 1751 | | |
| |||
1757 | 1761 | | |
1758 | 1762 | | |
1759 | 1763 | | |
1760 | | - | |
| 1764 | + | |
1761 | 1765 | | |
1762 | 1766 | | |
1763 | 1767 | | |
| |||
2029 | 2033 | | |
2030 | 2034 | | |
2031 | 2035 | | |
2032 | | - | |
2033 | | - | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
2034 | 2040 | | |
2035 | 2041 | | |
2036 | 2042 | | |
| |||
2579 | 2585 | | |
2580 | 2586 | | |
2581 | 2587 | | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
2582 | 2591 | | |
2583 | 2592 | | |
2584 | 2593 | | |
| |||
2660 | 2669 | | |
2661 | 2670 | | |
2662 | 2671 | | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
2663 | 2675 | | |
2664 | 2676 | | |
2665 | 2677 | | |
| |||
2669 | 2681 | | |
2670 | 2682 | | |
2671 | 2683 | | |
| 2684 | + | |
2672 | 2685 | | |
2673 | 2686 | | |
2674 | 2687 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
915 | | - | |
| 915 | + | |
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
| |||
1706 | 1706 | | |
1707 | 1707 | | |
1708 | 1708 | | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
1709 | 1725 | | |
1710 | 1726 | | |
1711 | 1727 | | |
0 commit comments