You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2006/12/18 05:39:25 UTC
DO NOT REPLY [Bug 41197] New: - Mixing calls to apr_file_write and apr_file_writev on buffered files causes data corruption
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41197>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41197
Summary: Mixing calls to apr_file_write and apr_file_writev on
buffered files causes data corruption
Product: APR
Version: HEAD
Platform: Other
OS/Version: other
Status: NEW
Keywords: PatchAvailable
Severity: major
Priority: P2
Component: APR
AssignedTo: bugs@apr.apache.org
ReportedBy: davi@haxent.com.br
Mixing calls to apr_file_write and apr_file_writev on buffered files causes data corruption
because the buffer is not being flushed properly when apr_file_writev is called. e.g:
struct iovec vec;
apr_file_write(file, "first\n", &nbytes);
vec.iov_base = "second\n";
vec.iov_len = 7;
apr_file_writev(file, &vec, 1, &nbytes);
yields a file whose contents is:
second\first\
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org
DO NOT REPLY [Bug 41197] - Mixing calls to apr_file_write and apr_file_writev on buffered files causes data corruption
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41197>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41197
chip@force-elite.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From chip@force-elite.com 2007-02-28 10:10 -------
Thanks, Committed in r512882.
One note: The 'best' solution would be to append to the write buffer, instead of
just forcing a flush; But this at least gets functionality working correctly.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org
DO NOT REPLY [Bug 41197] - Mixing calls to apr_file_write and apr_file_writev on buffered files causes data corruption
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41197>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41197
------- Additional Comments From davi@haxent.com.br 2006-12-17 20:40 -------
Created an attachment (id=19276)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19276&action=view)
flush the file buffer before calling writev
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org
DO NOT REPLY [Bug 41197] - Mixing calls to apr_file_write and apr_file_writev on buffered files causes data corruption
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41197>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41197
------- Additional Comments From davi@haxent.com.br 2006-12-18 12:48 -------
Created an attachment (id=19282)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19282&action=view)
test case
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org