Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#15242 - [libmysqlclient] broken variable binding

Attached to Project: Arch Linux
Opened by Pierre Schmitz (Pierre) - Wednesday, 24 June 2009, 05:59 GMT
Last edited by Allan McRae (Allan) - Thursday, 25 June 2009, 01:32 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Douglas Soares de Andrade (dsa)
Allan McRae (Allan)
Architecture All
Severity Critical
Priority High
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

The update from libmysqlclient 5.1.34-1 to 5.1.35-1 broke variable binding. The results are wrog data being written to and read from the database. These problems have beenconfirmed on several clients like PHP or Qt.

* Downgrading to the old libmysqlclient-5.1.34 package solved the problem
* Recompiling the old package results in a broken package
* Recompiling PHP did not solve the issue
* Recompiling all mysql pacakges (mysql-client, mysql) did not solve the issue

I would assume that the problem is our build system which produces broken binaries.

I have attached a simple test case. (you should adjust at least the mysql password) The correct output should be:

Stuttgart (DEU,Baden-Wuerttemberg)
Bordeaux (FRA,Aquitaine)

But we get:

Stuttgart (DEU,0)
Bordeaux (FRA,0)

Note: This bug is imho critical because the results are data loss and unforseen behaviour. And even worse: Most won't notice the problem because no error is thrown.
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 25 June 2009, 01:32 GMT
Reason for closing:  Fixed
Additional comments about closing:  5.1.35-2
Comment by Allan McRae (Allan) - Wednesday, 24 June 2009, 07:39 GMT
Does anyone have a computer with an out-dated toolchain on it to confirm if this is really a toolchain issue. Fedora use the same package version from the toolchain and do not seem to have a relevant patch in their mysql package.
Comment by Pierre Schmitz (Pierre) - Wednesday, 24 June 2009, 09:33 GMT
Very strange. My new attepmt to rebuild .35 with the old gcc was successful. (Also I though I already tried it) I downgrade gcc and gcc-libs to 4.3.3-1.

I'll rerun the test to make sure its not some kind of random behaviour.

Edit: OK, it really seems to work when we use gcc 4.3.3 to compile. I am sure I did test this before; maybe I only tested using the webserver and forget to restart it.

In short:
gcc 4.4 + libmysqlclient = broken
gcc 4.3 + libmysqlclient = fine

Maybe we can check this with a more recent gcc snapshot.
Comment by Pierre Schmitz (Pierre) - Wednesday, 24 June 2009, 12:20 GMT
Allan found the bug reported at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38562 Rebuilding libmysqlclient with -fno-strict-aliasing solved it. I'll commit the new package to extra.
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 24 June 2009, 12:56 GMT
Similar issue like this:  FS#15189  - [libnice] gcc optimizations -O2 (-fstrict-aliasing) breaks sha1.c

Loading...