Re: `char * s = "abc";' causes compile to crash with a segfault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff Garzik wrote:
[...]
>> Just out of curiosity, is sparse stable enough in general to be used
>> as a full-fledged front-end for a C compiler?
> 
> As long as you don't do super-weird, non-standard C:  sure.

Well --- I did find a whole bunch of bugs when working on Clue. OTOH
that was a while ago, so some of them might have been fixed by now. Look
back in the archives for 'Odd sparse behaviour' posted on 2008-07-06,
and 'Odd behaviour with OP_SCAST' posted on 2008-09-08.

In addition, I found a number of places where minor tweaks to what data
Sparse keeps around can make a compiler writer's life much easier; for
example, keeping more type data makes finding the type of a pseudo much
easier. There's a combined patch shipped with Clue that fixes and
enhances a bunch of this stuff:

http://cluecc.svn.sourceforge.net/viewvc/cluecc/clue/sparse.patch?revision=34&view=markup

(In fact, if you're generating llvm assembly directly, you may find it
easier just to add a backend to Clue rather than write your own, er,
middle-end --- a lot of the simplifications Clue does for languages like
Javascript also apply to llvm bitcode.)

<plug> Did I mention that Clue is now converting C into Java source that
runs at 40% of compiled C? </plug>

- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "People who think they know everything really annoy those of us who
│ know we don't." --- Bjarne Stroustrup
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ+Nf6f9E0noFvlzgRAvpIAKCcJG0/SZ0mbx5Iel0iR2GbfJpclACgiQuw
/pkelbkI9I0FkdXqX/bTbQ0=
=581X
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux