Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 494762 Details for
Bug 630698
dev-db/sqlite-3.20.1: csv01.test hangs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
sqlite-3.20.1-funsigned-char.patch
sqlite-3.20.1-funsigned-char.patch (text/plain), 1.58 KB, created by
Sergei Trofimovich (RETIRED)
on 2017-09-16 17:03:49 UTC
(
hide
)
Description:
sqlite-3.20.1-funsigned-char.patch
Filename:
MIME Type:
Creator:
Sergei Trofimovich (RETIRED)
Created:
2017-09-16 17:03:49 UTC
Size:
1.58 KB
patch
obsolete
>From 32ca60e9518b79ee9921c834eb30e425a45f6020 Mon Sep 17 00:00:00 2001 >From: Sergei Trofimovich <slyfox@gentoo.org> >Date: Sat, 16 Sep 2017 18:02:45 +0100 >Subject: [PATCH] Fix cvs handling hangup on -funsigned-char platforms > >The bug csv01.test hangs on powerpc32 and powerpc64 >(both are 'char' == 'unsigned char' platforms) > >Hangup happens in > > static int csvtabNext(sqlite3_vtab_cursor *cur){ > ... > if( z==0 || pCur->rdr.cTerm==EOF ){ > >Here 'pCur->rdr.cTerm' is of type 'char' (holds truncated EOF) >while EOF constant is (int)(-1). > >On 'signed char' platforms both arguments sign-extend to 'int' >before comparison and test "works". But ont on 'unsigned char' >platforms where comparison is '0xff == -1'. > >Workaround by trunacting EOF constant down to 'char' size. >Not an ideal fix but makes EOF handling more consistent. > >Reported-by: Matt Turner >Bug: https://bugs.gentoo.org/630698 >Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> >--- > ext/misc/csv.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/ext/misc/csv.c b/ext/misc/csv.c >index 6d99634..1bd9888 100644 >--- a/ext/misc/csv.c >+++ b/ext/misc/csv.c >@@ -686,7 +686,13 @@ static int csvtabNext(sqlite3_vtab_cursor *cur){ > pCur->aLen[i] = 0; > i++; > } >- if( z==0 || pCur->rdr.cTerm==EOF ){ >+ /* >+ * HACK: truncate EOF to 'char' to make code >+ * work equally (bad) on systems with signed >+ * and unsigned char. Other wise platforms >+ * with unsigned char loop indefinitely here. >+ */ >+ if( z==0 || pCur->rdr.cTerm==(char)EOF ){ > pCur->iRowid = -1; > }else{ > pCur->iRowid++; >-- >2.14.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 630698
: 494762