On 2015/10/04 20:22, Jérémie Courrèges-Anglas wrote: > I also had a diff for newsbeuter-2.9 but given the big changes - c++11 > and wordexp - I kinda lost interest. ;)
I think most actively-developed c++ programs seem to either already require c++11 or plan to need it soon (we are getting close to the situation we were in before we added gcc 4 to base). Since it has crash fixes I think updating makes sense. Requiring ports gcc won't restrict arch choices for newsbeuter - there are only packages for alpha, amd64, hppa, i386, sparc64. > Looking at the differences between 2.7 and 2.9, I doubt that this issue > got fixed. newsbeuter stores rss feeds and items timestamps as integers > in cache.db, an sqlite database. sqlite3 uses 64 bits integers under > the hood, but the sqlite3 format strings used in newsbeuter specify '%u' > for timestamps. This can't work on i386, and may also be the reason for > a weird time_t value on amd64 in > https://marc.info/?l=openbsd-ports&m=144251853400773&w=2 . > > I can easily reproduce on i386 the crashes experienced by Raf, the > following patch seems to fix those, and also addresses other similar > problems. I could port it to 2.9 for inclusion in the ports tree, but > maybe it would be better to contact upstream, and fix both wordexp and > time_t problems there first. > > Anyway, here's the patch for 2.7. Thoughts? Definitely makes sense to me. OK (with a REVISION bump of course). Side-note, -Wformat isn't triggered here. The sqlite printf-like functions aren't annotated, but even if I add this it doesn't help. I wonder what's up there. Index: src/sqlite3.h =================================================================== RCS file: /cvs/src/lib/libsqlite3/src/sqlite3.h,v retrieving revision 1.15 diff -u -p -r1.15 sqlite3.h --- src/sqlite3.h 12 Sep 2015 02:08:35 -0000 1.15 +++ src/sqlite3.h 5 Oct 2015 09:09:46 -0000 @@ -2365,10 +2365,14 @@ void sqlite3_free_table(char **result); ** addition that after the string has been read and copied into ** the result, [sqlite3_free()] is called on the input string.)^ */ -char *sqlite3_mprintf(const char*,...); -char *sqlite3_vmprintf(const char*, va_list); -char *sqlite3_snprintf(int,char*,const char*, ...); -char *sqlite3_vsnprintf(int,char*,const char*, va_list); +char *sqlite3_mprintf(const char*,...) + __attribute__((__format__ (printf, 1, 2))); +char *sqlite3_vmprintf(const char*, va_list) + __attribute__((__format__ (printf, 1, 0))); +char *sqlite3_snprintf(int,char*,const char*, ...) + __attribute__((__format__ (printf, 3, 4))); +char *sqlite3_vsnprintf(int,char*,const char*, va_list) + __attribute__((__format__ (printf, 3, 0))); /* ** CAPI3REF: Memory Allocation Subsystem