<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Sanitizer CHECK failed: ((allocated_for_dlsym)) < ((kDlsymAllocPoolSize)) (1036, 1024)) with preload"
   href="https://bugs.llvm.org/show_bug.cgi?id=33206">33206</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Sanitizer CHECK failed: ((allocated_for_dlsym)) < ((kDlsymAllocPoolSize)) (1036, 1024)) with preload
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>d.khalikov@partner.samsung.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18529" name="attach_18529" title="patch for this Issue">attachment 18529</a> <a href="attachment.cgi?id=18529&action=edit" title="patch for this Issue">[details]</a></span>
patch for this Issue

Hello everyone,
I've faced a situation with error:
Sanitizer CHECK failed: asan_malloc_linux.cc:42 ((allocated_for_dlsym)) <
((kDlsymAllocPoolSize)) (1036, 1024).

when LD_PRELOAD set to libclang_rt.asan-x86_64.so

It seems like there is might be a situation when asan initializing later than
shared library which has malloc in static constructor. (rtld doesn't provide
the order of initiazation). In this case asan doesn't init interceptors but
already intercepting malloc (for example). If malloc is too big to be handled
by static local pool asan will die with error:
Sanitizer CHECK failed: libsanitizer/asan/asan_malloc_linux.cc:40
((allocated_for_dlsym)) < ((kDlsymAllocPoolSize)) (1036, 1024)

I have a patch which can help to resolve this problem.
Can someone please review that patch.
Thanks.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>