Message140904
Patch attached.
> For lseek, we can rely on errno. Try something like that:
>
> errno = 0;
> offset = lseek(...);
> if (offset == (off_t)-1 && errno) /* error */
>
It's a little bit overkill :-) (for mktime, time_t can overflow easily
on 32-bit).
> We can write a test using a sparse file... Or maybe a mmap object?
>
I'm not sure it's easily testable, because it's really a corner case
not addressed by POSIX. On my Linux box, I can't get lseek to return a
negative value, I get EINVAL - which does make sense (the Linux kernel
doesn't accept or return negative file offsets, see
http://lwn.net/Articles/138063/).
Kuberan, on what operating system did you notice this problem? Solaris? |
|
Date |
User |
Action |
Args |
2011-07-22 20:35:06 | neologix | set | recipients:
+ neologix, jcea, pitrou, vstinner, Kuberan.Naganathan |
2011-07-22 20:35:06 | neologix | link | issue12545 messages |
2011-07-22 20:35:06 | neologix | create | |
|