Actions
Bug #5407
closedDuplicated labels are generated
Start date:
11/05/2014
Due date:
% Done:
0%
Estimated time:
Detected in build:
2c42610
Platform:
Published in build:
Description
For the driver
linux-3.17-rc1.tar.xz 32_7a net/rds/rds.ko
For the function rds_page_copy_user
64 if (to_user) { 65 rds_stats_add(s_copy_to_user, bytes); 66 ret = copy_to_user(ptr, addr + offset, bytes); 67 } else { 68 rds_stats_add(s_copy_from_user, bytes); 69 ret = copy_from_user(addr + offset, ptr, bytes); 70 }
CPAchecker and GCC report an error
Error: Parsing failed (net/rds/page.o.i, line 74772: Duplicate label ldv_51354 in function rds_page_copy_user: ldv_51354:;) (EclipseCParser.buildCFA, SEVERE)
It looks like this macro is apllied (or some similar)
308 #define __pcpu_size_call_return(stem, variable) \ 309 ({ \ 310 typeof(variable) pscr_ret__; \ 311 __verify_pcpu_ptr(&(variable)); \ 312 switch(sizeof(variable)) { \ 313 case 1: pscr_ret__ = stem##1(variable); break; \ 314 case 2: pscr_ret__ = stem##2(variable); break; \ 315 case 4: pscr_ret__ = stem##4(variable); break; \ 316 case 8: pscr_ret__ = stem##8(variable); break; \ 317 default: \ 318 __bad_size_call_parameter(); break; \ 319 } \ 320 pscr_ret__; \ 321 })
For two switches label with the same names are generated. Look into the attached file.
Files
Actions