Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

-Always use strictest alignment type for arbitrary pointers.

Code Block
bgColor#ccccff

int *loop_ptr;

...


int * int_ptr;

...



int *loopFunction(int *v_pointer)
{

...

    return v_pointer;

...

 }

...


int_ptr = loopFunction(loop_ptr);

...

#ccccff
Code Block
bgColor

Risk Assessment

Accessing a pointer that is no longer on the correct access boundary can cause a program to crash, give wrong information or have slow pointer accesses (if the architecture does not care about alignment).

...