aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-03-04 07:45:58 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-03-04 07:45:58 +0530
commit000232b9bcbf194f1e5fd0ff380000f341505405 (patch)
tree252e22a971caa7021ae130c080ccb161daba33cc /ChangeLog
parent116f4d1ad64a061488b29ef89f1a60f5e8c5963b (diff)
downloadglibc-000232b9bcbf194f1e5fd0ff380000f341505405.zip
glibc-000232b9bcbf194f1e5fd0ff380000f341505405.tar.gz
glibc-000232b9bcbf194f1e5fd0ff380000f341505405.tar.bz2
Separate ftell from fseek logic and avoid modifying FILE data (#16532)
ftell semantics are distinct from fseek(SEEK_CUR) especially when it is called on a file handler that is not yet active. Due to this caveat, much care needs to be taken while modifying the handler data and hence, this first iteration on separating out ftell focusses on maintaining handler data integrity at all times while it figures out the current stream offset. The result is that it makes a syscall for every offset request. There is scope for optimizing this by caching offsets when we know that the handler is active. A simple way to find out is when the buffers have data. It is not so simple to find this out when the buffer is empty without adding some kind of flag.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog12
1 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1bcbeea..d8d87d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2014-03-04 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #16532]
+ * libio/libioP.h (get_file_offset): New function.
+ * libio/fileops.c (get_file_offset): Likewise.
+ (do_ftell): Likewise.
+ (_IO_new_file_seekoff): Split out ftell logic.
+ * libio/wfileops.c (do_ftell_wide): Likewise.
+ (_IO_wfile_seekoff): Split out ftell logic.
+ * libio/tst-ftell-active-handler.c: New test case.
+ * libio/Makefile (tests): Add it.
+
2014-03-03 Roland McGrath <roland@hack.frob.com>
* nptl/ChangeLog: Renamed to nptl/ChangeLog.old, no longer used.