<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - Assertion `Section && "Cannot switch to a null section!"'"
   href="http://llvm.org/bugs/show_bug.cgi?id=19049">19049</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `Section && "Cannot switch to a null section!"'
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>MC
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nlewycky@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, rafael.espindola@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat b.ll
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

module asm ".pushsection \22.debug_gdb_scripts\22, \22MS\22,%progbits,1"
module asm ".byte 1"
module asm ".asciz \22gdbscript\22"
module asm ".popsection"

$ llc b.ll
llc: MCAsmStreamer.cpp:321: virtual void
{anonymous}::MCAsmStreamer::ChangeSection(const llvm::MCSection*, const
llvm::MCExpr*): Assertion `Section && "Cannot switch to a null section!"'
failed.
0  llc             0x00000000018bdbfe llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1  llc             0x00000000018bde7b
2  llc             0x00000000018bd815
3  libpthread.so.0 0x00007f1c6327acb0
4  libc.so.6       0x00007f1c625b2425 gsignal + 53
5  libc.so.6       0x00007f1c625b5b8b abort + 379
6  libc.so.6       0x00007f1c625ab0ee
7  libc.so.6       0x00007f1c625ab192
8  llc             0x0000000001664318
9  llc             0x0000000000b63877
10 llc             0x00000000012734f1
11 llc             0x0000000001276729
12 llc             0x0000000001249de5
13 llc             0x0000000001246b3e
14 llc             0x00000000011e1425
llvm::AsmPrinter::EmitInlineAsm(llvm::StringRef, llvm::MDNode const*,
llvm::InlineAsm::AsmDialect) const + 1341
15 llc             0x00000000011d1955
llvm::AsmPrinter::doInitialization(llvm::Module&) + 873
16 llc             0x00000000018342ae
llvm::FPPassManager::doInitialization(llvm::Module&) + 68
17 llc             0x0000000001834448
18 llc             0x0000000001834b94
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 244
19 llc             0x0000000001834d9f
llvm::legacy::PassManager::run(llvm::Module&) + 39
20 llc             0x0000000000940a17
21 llc             0x000000000093fd4d main + 237
22 libc.so.6       0x00007f1c6259d76d __libc_start_main + 237
23 llc             0x000000000093d6f9
Stack dump:
0.      Program arguments: llvm/Debug+Asserts/bin/llc b.ll 
Aborted (core dumped)

I failed at getting this to happen with just llvm-mc though:

$ cat b.s
.pushsection ".debug_gdb_scripts", "MS",%progbits,1
.byte 1
.asciz "gdbscript"
.popsection

$ llvm-mc b.s
        .text
        .section        .debug_gdb_scripts,"MS",@progbits,1

        .byte   1
        .ascii  "gdbscript"
        .byte   0
        .text</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>