1. 30 May, 2021 3 commits
    • Jeff Epler's avatar
      py/repl: Don't read past the end of import_str. · d67f4115
      Jeff Epler authored
      asan considers that memcmp(p, q, N) is permitted to access N bytes at each
      of p and q, even for values of p and q that have a difference earlier.
      Accessing additional values is frequently done in practice, reading 4 or
      more bytes from each input at a time for efficiency, so when completing
      "non_exist<TAB>" in the repl, this causes a diagnostic:
      
          ==16938==ERROR: AddressSanitizer: global-buffer-overflow on
          address 0x555555cd8dc8 at pc 0x7ffff726457b bp 0x7fffffffda20 sp 0x7fff
          READ of size 9 at 0x555555cd8dc8 thread T0
              #0 0x7ffff726457a  (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xb857a)
              #1 0x555555b0e82a in mp_repl_autocomplete ../../py/repl.c:301
              #2 0x555555c89585 in readline_process_char ../../lib/mp-readline/re
              #3 0x555555c8ac6e in readline ../../lib/mp-readline/readline.c:513
              #4 0x555555b8dcbd in do_repl /home/jepler/src/micropython/ports/uni
              #5 0x555555b90859 in main_ /home/jepler/src/micropython/ports/unix/
              #6 0x555555b90a3a in main /home/jepler/src/micropython/ports/unix/m
              #7 0x7ffff619a09a in __libc_start_main ../csu/libc-start.c:308
              #8 0x55555595fd69 in _start (/home/jepler/src/micropython/ports/uni
      
          0x555555cd8dc8 is located 0 bytes to the right of global variable
          'import_str' defined in '../../py/repl.c:285:23' (0x555555cd8dc0) of
          size 8
            'import_str' is ascii string 'import '
      Signed-off-by: default avatarJeff Epler <jepler@gmail.com>
      d67f4115
    • Jeff Epler's avatar
    • Jeff Epler's avatar
      py/compile: Raise an error on async with/for outside an async function. · f2dbc910
      Jeff Epler authored
      A simple reproducer is:
      
         async for x in (): x
      
      Before this change, it would cause an assertion error in mpy-cross and
      micropython-coverage.
      f2dbc910
  2. 29 May, 2021 3 commits
  3. 28 May, 2021 1 commit
  4. 27 May, 2021 2 commits
  5. 26 May, 2021 9 commits
  6. 25 May, 2021 4 commits
  7. 24 May, 2021 1 commit
  8. 22 May, 2021 2 commits
  9. 21 May, 2021 2 commits
  10. 20 May, 2021 10 commits
  11. 18 May, 2021 3 commits