Project

General

Profile

Actions

Bug #7833

closed

Wrong array address transformation

Added by Anton Vasilyev over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
C back-end
Start date:
01/09/2017
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

On module drivers/scsi/scsi_mod.ko CIF transforms

struct scsi_host_sg_pool scsi_sg_pools[5] = {...};
struct scsi_host_sg_pool *sgp = scsi_sg_pools + i;

to source with different meaning:
struct scsi_host_sg_pool scsi_sg_pools[5] = {...};
struct scsi_host_sg_pool *sgp;
sgp = (struct scsi_host_sg_pool *)(&scsi_sg_pools + (unsigned long)i);


Related issues 1 (0 open1 closed)

Related to C Instrumentation Framework - Bug #7673: Wrong transformation with type conversionClosedEvgeny Novikov11/02/2016

Actions
Actions #1

Updated by Anton Vasilyev over 7 years ago

On module drivers/scsi/sg.ko CIF transforms

struct sg_proc_leaf sg_proc_leaf_arr[7] = {...}
struct sg_proc_leaf *leaf ;
leaf = &sg_proc_leaf_arr[k];

to
struct sg_proc_leaf sg_proc_leaf_arr[7] = {...}
struct sg_proc_leaf *leaf ;
leaf = (struct sg_proc_leaf *)(& sg_proc_leaf_arr + (unsigned long )k);

which is wrong because of operators precedence

Actions #2

Updated by Evgeny Novikov over 7 years ago

  • Status changed from New to Rejected
  • Assignee deleted (Evgeny Novikov)

That was a consequence of incorrectly fixed #7673. I reverted this change and proposed a fair fix, so this issue has gone.

Actions

Also available in: Atom PDF