Opened 6 years ago

Closed 6 years ago

#4244 closed enhancement (fixed)

Travis: Enable UBSan checks in CI

Reported by: Algunenano Owned by: Algunenano
Priority: medium Milestone: PostGIS 3.0.0
Component: postgis Version: master
Keywords: Cc:

Description


Change History (9)

comment:1 by Algunenano, 6 years ago

Adding a check with both gcc and clang undefined behaviour sanitizer in Travis.

For now, I'll leave out topology since debugging it requires knowing at least how it's supposed to work.

comment:2 by algunenano, 6 years ago

In 17034:

Travis: Run CI under GCC's undefined behavior sanitizer

References #4244
Closes https://github.com/postgis/postgis/pull/335

comment:3 by Algunenano, 6 years ago

PR adding clang UBsan checks: https://github.com/postgis/postgis/pull/337

Thanks to Kompzpa for the help adding Clang to the docker image.

Pending:

  • Have a Docker image that compiles Postgresql with clang so clang's ubsan is also run in the extension code (the part using PGXS). This would also be useful in case we want to debug JIT issues, as currently gcc is being used.
  • Fix topology undefined behaviour alerts: I might revisit it at some point in the future, but I find other warnings (memory sanitizer) more interesting right now.

comment:4 by algunenano, 6 years ago

In 17054:

Travis: Run CI under clang's ubsan

References #4244
Closes https://github.com/postgis/postgis/pull/337

comment:5 by Algunenano, 6 years ago

The issue in topology is an unaligned memory access in BOX2D_out, so it was really in the Postgis extension, not topology itself.

Addressed in https://github.com/postgis/postgis/pull/342

comment:6 by algunenano, 6 years ago

In 17056:

Avoid unaligned memory access in BOX2D_out

References #4244

comment:7 by algunenano, 6 years ago

In 17057:

Avoid unaligned memory access in BOX2D_out

References #4244

comment:8 by algunenano, 6 years ago

In 17058:

Avoid unaligned memory access in BOX2D_out

References #4244

comment:9 by algunenano, 6 years ago

Resolution: fixed
Status: assignedclosed

In 17059:

Avoid unaligned memory access in BOX2D_out

Also enables UBSan in Travis runs for topology

Closes #4244
Closes https://github.com/postgis/postgis/pull/342

Note: See TracTickets for help on using tickets.