Re: [sqlite] Bug report: USBAN failure

2014-12-03 Thread Scott Robison
On Wed, Dec 3, 2014 at 5:46 PM, Simon Slavin wrote: > > On 4 Dec 2014, at 12:26am, James K. Lowden > wrote: > > > What to do is another question. SQLite can surely ignore it. If I > > felt strongly about it, I'd submit a bug report to GCC

Re: [sqlite] Bug report: USBAN failure

2014-12-03 Thread James K. Lowden
On Wed, 03 Dec 2014 08:56:44 +0100 Clemens Ladisch wrote: > James K. Lowden wrote: > > /* Copy N bytes of SRC to DEST. */ > > extern void *memcpy (void *__restrict __dest, > > __const void *__restrict __src, size_t __n) > > __THROW __nonnull ((1,

Re: [sqlite] Bug report: USBAN failure

2014-12-03 Thread Scott Robison
On Wed, Dec 3, 2014 at 9:50 AM, Stephan Beal wrote: > On Wed, Dec 3, 2014 at 5:35 PM, Scott Robison > wrote: > > > standards have all been ISO standards. Pedantic? Yes. Obviously DRH is > > willing to make the code more portable as long as it

Re: [sqlite] Bug report: USBAN failure

2014-12-03 Thread Stephan Beal
On Wed, Dec 3, 2014 at 5:35 PM, Scott Robison wrote: > standards have all been ISO standards. Pedantic? Yes. Obviously DRH is > willing to make the code more portable as long as it doesn't violate > ANSI-C, hence his patch early in the thread (see >

Re: [sqlite] Bug report: USBAN failure

2014-12-03 Thread Scott Robison
On Wed, Dec 3, 2014 at 2:17 AM, Clemens Ladisch wrote: > Scott Robison wrote: > > On Dec 3, 2014 12:57 AM, "Clemens Ladisch" wrote: > >> Do you have a standard that allows NULL? The one I quoted does not. > > > > Note: I'll have to double check my copy

Re: [sqlite] Bug report: USBAN failure

2014-12-03 Thread Clemens Ladisch
Scott Robison wrote: > On Dec 3, 2014 12:57 AM, "Clemens Ladisch" wrote: >> Do you have a standard that allows NULL? The one I quoted does not. > > Note: I'll have to double check my copy of the C90 standard document, but > my re-reading of the C99 quote leads me to the

Re: [sqlite] Bug report: USBAN failure

2014-12-03 Thread Scott Robison
On Dec 3, 2014 12:57 AM, "Clemens Ladisch" wrote: > > Do you have a standard that allows NULL? The one I quoted does not. Note: I'll have to double check my copy of the C90 standard document, but my re-reading of the C99 quote leads me to the conclusion that NULL is a valid

Re: [sqlite] Bug report: USBAN failure

2014-12-03 Thread Scott Robison
On Dec 3, 2014 12:57 AM, "Clemens Ladisch" wrote: > > James K. Lowden wrote: > > /* Copy N bytes of SRC to DEST. */ > > extern void *memcpy (void *__restrict __dest, > > __const void *__restrict __src, size_t __n) > > __THROW __nonnull ((1, 2)); > >

Re: [sqlite] Bug report: USBAN failure

2014-12-02 Thread Clemens Ladisch
James K. Lowden wrote: > /* Copy N bytes of SRC to DEST. */ > extern void *memcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) > __THROW __nonnull ((1, 2)); > > IIUC the declaration specifies the pointer cannot be NULL and the > compiler

Re: [sqlite] Bug report: USBAN failure

2014-12-02 Thread James K. Lowden
On Tue, 02 Dec 2014 15:58:47 +0100 Abramo Bagnara wrote: > The point is not about overzealousness, but about the declaration of > memcpy/memset on your machine. > > If it contains the nonnull attribute then (correctly) UBSan detect > that such constraint is not

Re: [sqlite] Bug report: USBAN failure

2014-12-02 Thread Hadley Wickham
>> The block of code that refers to is: >> >> if( p->azVar ){ >> p->nzVar = pParse->nzVar; >> memcpy(p->azVar, pParse->azVar, p->nzVar*sizeof(p->azVar[0])); >> memset(pParse->azVar, 0, pParse->nzVar*sizeof(pParse->azVar[0])); >> } >> >> So maybe the check should be on

Re: [sqlite] Bug report: USBAN failure

2014-12-02 Thread Abramo Bagnara
Il 02/12/2014 15:02, Richard Hipp ha scritto: > On Tue, Dec 2, 2014 at 8:53 AM, Dominique Devienne > wrote: > >> On Tue, Dec 2, 2014 at 2:47 PM, Richard Hipp wrote: >> >>> On Mon, Dec 1, 2014 at 5:46 PM, Hadley Wickham >>> wrote:

Re: [sqlite] Bug report: USBAN failure

2014-12-02 Thread Richard Hipp
On Tue, Dec 2, 2014 at 8:53 AM, Dominique Devienne wrote: > On Tue, Dec 2, 2014 at 2:47 PM, Richard Hipp wrote: > > > On Mon, Dec 1, 2014 at 5:46 PM, Hadley Wickham > > wrote: > > > [...] has started running all R packages with USBAN.

Re: [sqlite] Bug report: USBAN failure

2014-12-02 Thread Clemens Ladisch
Richard Hipp wrote: > But apparently there is an issue in USBAN in that it does not allow calls > to memcpy() and memset() with NULL pointers even it the count field (the > third parameter) is zero. I couldn't find anything in the memcpy() or > memset() documentation that disallowed this case.

Re: [sqlite] Bug report: USBAN failure

2014-12-02 Thread Dominique Devienne
On Tue, Dec 2, 2014 at 2:47 PM, Richard Hipp wrote: > On Mon, Dec 1, 2014 at 5:46 PM, Hadley Wickham > wrote: > > [...] has started running all R packages with USBAN. This reveals a > problem in sqlite.c > > I'm not sure what USBAN is > Most likely a typo.

Re: [sqlite] Bug report: USBAN failure

2014-12-02 Thread Richard Hipp
On Mon, Dec 1, 2014 at 5:46 PM, Hadley Wickham wrote: > Hi, > > I'm the maintainer of RSQLite, the R language binding for SQLite. > Recently, CRAN (the common R archive network) has started running all > R packages with USBAN. This reveals a problem in sqlite.c > ( >

[sqlite] Bug report: USBAN failure

2014-12-02 Thread Hadley Wickham
Hi, I'm the maintainer of RSQLite, the R language binding for SQLite. Recently, CRAN (the common R archive network) has started running all R packages with USBAN. This reveals a problem in sqlite.c (http://www.stats.ox.ac.uk/pub/bdr/memtests/UBSAN-gcc/RSQLite/tests/testthat.Rout) >