[LU-9829] wrong pointer dereference in libcfs/util/parser.c Created: 04/Aug/17 Updated: 13/Sep/18 Resolved: 17/Aug/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.11.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
This is highleghted by newer gcc as in Fedora 26: util/parser.c: In function Б─≤processБ─≥:
util/parser.c:199:28: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
if ( *next == '\0' ) {
^~
util/parser.c:199:22: note: did you mean to dereference the pointer?
if ( *next == '\0' ) {
^
cc1: all warnings being treated as errors
make[4]: *** [autoMakefile:671: libcfsutil_a-parser.o] Error 1
make[4]: Leaving directory '/home/green/smt/git/lustre-release/libcfs/libcfs'
Apparently we really need to do double dereference on next. |
| Comments |
| Comment by Gerrit Updater [ 04/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/28358 |
| Comment by Oleg Drokin [ 04/Aug/17 ] |
|
Additionally there's a similar problem in lr_rsync_data(): snprintf(cmd, PATH_MAX, "%s --inplace %s %s", rsync, info->src, info->dest); lr_debug(DTRACE, "\t%s %s\n", cmd, info->tfid); status = system(cmd); |
| Comment by Gerrit Updater [ 17/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28358/ |
| Comment by Peter Jones [ 17/Aug/17 ] |
|
Landed for 2.11 |
| Comment by Gerrit Updater [ 13/Sep/18 ] |
|
Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33159 |