<pre class="notranslate">The following program crashes 6c

struct s {int m;} void f(void) {}

Here is the stacktrace according to gdb

$ gdb --args ../pkg/tool/linux_amd64/6c crash.c 
Reading symbols from /usr/local/google/home/cshapiro/go/pkg/tool/linux_amd64/6c...done.
(gdb) run
Starting program: /usr/local/google/home/cshapiro/go/pkg/tool/linux_amd64/6c crash.c

Program received signal SIGSEGV, Segmentation fault.
0x00000000004393bd in __quotesetup (s=0x0, r=0x10000, nin=-1, nout=163,
q=0x7fffffffbc60, sharp=0, 
    runesout=0) at /usr/local/google/home/cshapiro/go/src/lib9/fmt/fmtquote.c:47
��/usr/local/google/home/cshapiro/go/src/lib9/fmt/fmtquote.c:47:1643:beg:0x4393bd
(gdb) where
#0  0x00000000004393bd in __quotesetup (s=0x0, r=0x10000, nin=-1, nout=163,
q=0x7fffffffbc60, sharp=0, 
    runesout=0) at /usr/local/google/home/cshapiro/go/src/lib9/fmt/fmtquote.c:47
#1  0x0000000000439e72 in __quotestrfmt (runesin=1, f=0x7fffffffbd80)
    at /usr/local/google/home/cshapiro/go/src/lib9/fmt/fmtquote.c:221
#2  0x0000000000439f28 in quoterunestrfmt (f=0x7fffffffbd80)
    at /usr/local/google/home/cshapiro/go/src/lib9/fmt/fmtquote.c:244
#3  0x0000000000439154 in __fmtdispatch (f=0x7fffffffbd80, fmt=0x44b598, isrunes=0)
    at /usr/local/google/home/cshapiro/go/src/lib9/fmt/fmt.c:229
#4  0x0000000000437070 in dofmt (f=0x7fffffffbd80, fmt=0x44b597 "Q")
    at /usr/local/google/home/cshapiro/go/src/lib9/fmt/dofmt.c:80
#5  0x000000000043b973 in vseprint (buf=0x7fffffffbe40 "duplicate types given:
STRUCT s and ", 
    e=0x7fffffffbf08 "", fmt=0x44b578 "duplicate types given: %T and %Q", args=0x7fffffffbe28)
    at /usr/local/google/home/cshapiro/go/src/lib9/fmt/vseprint.c:39
#6  0x000000000043036c in diag (n=0x0, fmt=0x44b578 "duplicate types given: %T and
%Q")
    at /usr/local/google/home/cshapiro/go/src/cmd/cc/sub.c:1196
#7  0x0000000000433b0f in yyparse () at cc.y:984
#8  0x000000000042694b in compile (file=0x7fffffffe23e "crash.c", defs=0x0,
ndef=0)
    at /usr/local/google/home/cshapiro/go/src/cmd/cc/lex.c:325
#9  0x000000000042613d in p9main (argc=1, argv=0x7fffffffddf0)
    at /usr/local/google/home/cshapiro/go/src/cmd/cc/lex.c:196
#10 0x000000000043bffc in main (argc=2, argv=0x7fffffffdde8)
    at /usr/local/google/home/cshapiro/go/src/lib9/main.c:55
(gdb)</pre>
<p dir="auto">by <strong><a href="mailto:alex@zylman.com">alex@zylman.com</a></strong>:</p>
<pre class="notranslate">Similar to issue #6258, but not the same.

What steps will reproduce the problem?
Try to read a CSV file where the fields are unquoted and one of them begins in something
that would need lazy quotes, e.g.
Field1,Field2,"LazyQuotes" Field3,Field4,Field5

What is the expected output?
["Field1", "Field2", "\"LazyQuotes\" Field3",
"Field4", "Field5"]
Length 5

What do you see instead?
["Field1", "Field2", "LazyQuotes\"
Field3,Field4,Field5"]
Length 3

Which compiler are you using (5g, 6g, 8g, gccgo)?
Whatever the default is from <a href="https://code.google.com/p/go/downloads/list" rel="nofollow">https://code.google.com/p/go/downloads/list</a>

Which operating system are you using?
Mac OS X 10.8

Which version are you using?  (run 'go version')
go version go1.1.2 darwin/amd64</pre>