Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-18269

Off-by-one bug in

    XMLWordPrintable

Details

    Description

      commit b0fd06a6f27212cee770961171439a44626d8f14 (MDEV-15670 - unit.my_atomic failed in buildbot with Signal 11 thrown) introduces an off-by-one overflow in unittest/mysys/thr_template.c.

      This causes tests to fail:

      $ ./unittest/mysys/m
      y_atomic-t
      # N CPUs: 20
      1..5
      # Testing my_atomic_add32 with 30 threads, 3000 iterations... 
      Bail out! Signal 4 thrown
      # 5 tests planned,  0 failed,  0 was last executed
      

      Backtrace:

      Thread 1 "my_atomic-t" received signal SIGILL, Illegal instruction.
      __bin_chunk (self=0x10035a230) at src/malloc/malloc.c:452
      452     src/malloc/malloc.c: No such file or directory.
      (gdb) bt
      #0  __bin_chunk (self=0x10035a230) at src/malloc/malloc.c:452
      #1  0x000000010001a728 in test_concurrently (
          test=0x1000434e0 "my_atomic_add32", handler=0x10001a354 <test_atomic_add>, 
          n=<optimized out>, m=<optimized out>)
          at /home/ncopa/aports/main/mariadb/src/mariadb-10.3.12/unittest/mysys/thr_template.c:50
      #2  0x000000010001a83c in do_tests ()
          at /home/ncopa/aports/main/mariadb/src/mariadb-10.3.12/unittest/mysys/my_atomic-t.c:108
      #3  0x000000010001a068 in main (argc=<optimized out>, argv=<optimized out>)
          at /home/ncopa/aports/main/mariadb/src/mariadb-10.3.12/unittest/mysys/thr_template.c:68
      (gdb) 
      

      Attachments

        Issue Links

          Activity

            People

              svoj Sergey Vojtovich
              ncopa Natanael Copa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.