First Last Prev Next    No search results available
Details
: Tablegen aborts on errors
Bug#: 235
: tools
: TableGen
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.0
: P2
: enhancement
: 1.2

:
: crash-on-invalid
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Brian R. Gaeke <gaeke+bugs@uiuc.edu>
Assigned To: Misha Brukman <brukman+bugs@uiuc.edu>

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2004-02-13 01:25
Tablegen dumps core if you try to use the "include" statement to include
a file that doesn't exist. For example:

185 zion> echo 'include "../crzjgrdwldiwdc.td"' > whoops.td
186 zion> tblgen whoops.td
Parsing whoops.td:1: Could not find include file '/../crzjgrdwldiwdc.td'!
Abort (core dumped)

Also note the error message has the wrong filename.
------- Comment #1 From Chris Lattner 2004-02-13 10:32:06 -------
Tablegen's entire error recovery strategy is built around the idea that calling
'abort' is a solution.

This certainly should be fixed, but it's not a high priority.  :)

-Chris
------- Comment #2 From Brian R. Gaeke 2004-02-13 10:34:27 -------
I'm a fan of incremental improvement - as the *original* title of the bug
implied, I would be satisfied 
with something that just called exit(1) instead of dumping core. :-)
------- Comment #3 From Chris Lattner 2004-02-13 10:35:45 -------
Oh, and this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040209/011581.html

Fixes the 'wrong filename' problem:

$ echo 'include "../crzjgrdwldiwdc.td"' | tblgen 
Parsing <stdin>:1: Could not find include file '../crzjgrdwldiwdc.td'!
Abort

-Chris
------- Comment #4 From Chris Lattner 2004-02-13 10:36:13 -------
I would support exit(1).  :)

-Chris
------- Comment #5 From Chris Lattner 2004-02-13 10:39:21 -------
Fine, have it your way.  :)  I thought tablegen abort'ing for the fun of it was
kinda cute myself.  Especially the plethora of core files that you get to
accumulate.  No fun for tablegen I guess.

Patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040209/011582.html

-Chris
------- Comment #6 From Brian R. Gaeke 2004-02-13 11:49:59 -------
Thanks!

First Last Prev Next    No search results available