py/asmbase: Fix assertion error with viper code.
In the case of viper code it's possible to reach MP_ASM_PASS_EMIT with a code size of 0 bytes. Update the assertion accordingly. After this change, `mpy-cross -march=debug' on viper tests no longer crashes. Fixes issue #17467. Signed-off-by: Jeff Epler <jepler@gmail.com>
This commit is contained in:
parent
fc6205c4f0
commit
5ff2ae5a6c
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ void mp_asm_base_start_pass(mp_asm_base_t *as, int pass) {
|
|||
} else {
|
||||
// allocating executable RAM is platform specific
|
||||
MP_PLAT_ALLOC_EXEC(as->code_offset, (void **)&as->code_base, &as->code_size);
|
||||
assert(as->code_base != NULL);
|
||||
assert(as->code_size == 0 || as->code_base != NULL);
|
||||
}
|
||||
as->pass = pass;
|
||||
as->suppress = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue