Bug 484362
| Summary: | gcc (or glibc) memset: starts writing 4 bytes earlier then given pointer | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Hans de Goede <hdegoede> |
| Component: | SDL | Assignee: | Thomas Woerner <twoerner> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | rawhide | CC: | guitarz1, jakub, kevin, twoerner, zprikryl |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 1.2.13-7.fc10 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-03-02 17:00:29 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Hans de Goede
2009-02-06 14:12:54 UTC
That's a SDL bug. The i386 (and x86-64) ABI says that on function entry the direction flag in %eflags must be clear, but it seems that SDL_revcpy (haven't checked other places) in inline assembly uses the std instruction without adding corresponding cld afterwards. cld in SDL_memcpy etc. isn't needed, but it should be always used after you do std. I.e. std; rep; stos*...; cld; etc. *** Bug 484121 has been marked as a duplicate of this bug. *** (In reply to comment #1) > That's a SDL bug. The i386 (and x86-64) ABI says that on function entry > the direction flag in %eflags must be clear, but it seems that > SDL_revcpy (haven't checked other places) in inline assembly uses the std > instruction without adding corresponding cld afterwards. cld in SDL_memcpy > etc. isn't needed, but it should be always used after you do std. I.e. > std; rep; stos*...; cld; etc. Jakub, you rock! Right on the money, disabling the inline SDL_revcpy function fixes this. I've filed a bug about this with upstream SDL: http://bugzilla.libsdl.org/show_bug.cgi?id=699 And a fixed SDL build is on its way to rawhide and F10-updates Looks like this may also be the real cause of rocksndiamonds bug 478664, which was magically "fixed" by a rocksndiamonds update, but Valgrind still complains. (Note that this is on F9 i386.) SDL-1.2.13-7.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report. |