grep - Bugs: bug #36883, ptrdiff_t / size_t mixture
You are not allowed to post comments on this tracker with your current authentication level.
bug #36883: ptrdiff_t / size_t mixture
Submitter: | Jaroslav Škarvada <yarda> | ||
Submitted: | Thu 19 Jul 2012 02:27:47 PM UTC | ||
Category: | None | Severity: | 3 - Normal |
Item Group: | None | Status: | Fixed |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed |
Thu 19 Jul 2012 09:08:46 PM UTC, comment #1: |
Paul Eggert <eggert> |
Thu 19 Jul 2012 02:27:47 PM UTC, original submission:
dfasearch.c: In function 'EGexecute':
|
Jaroslav Škarvada <yarda> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2012-07-19 | eggert | Attached File | - | Added grep-patch.txt, #26227 | |
Status | None | Fixed | |||
Open/Closed | Open | Closed | |||
2012-07-19 | yarda | Attached File | - | Added patch.patch, #26223 |
Powered by Savane 3.13-02a9.
Corresponding source code
Thanks for reporting the problem. This is a bug on s390 and any other platform where ptrdiff_t and size_t have different representations for nonnegative values. I installed the attached patch into the 'grep' trunk.
There could still be a problem on the s390 if a buffer gets larger than 2 GiB, since that will exceed what ptrdiff_t can represent. Fixing this will be trickier, though, as we'd have to make sure we never allocate an array with more than PTRDIFF_MAX bytes. That is a different bug, though, so I'll close the current bug report.
(file #26227)