goblint / goblint/analyzer

Fix regression tests with fortify source

Open
#706 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue testing
Dominant language
OCaml
Stars
252
Forks
90
Avg merge
4d 1m
Merged PRs (30d)
19

Description

Using _FORTIFY_SOURCE (and the optimization required for it), regression tests can be run with:

gobopt='--set pre.cppflags[+] -D_FORTIFY_SOURCE=2 --set pre.cppflags[+] -O3' ./scripts/update_suite.rb

I used these options to debug MacOS failures following #696, since apparently MacOS seems to do some fortification by default (and thus use alternative built-in bounds-checked versions of some special functions using macro definitions).

Failures

As of writing, this causes 8 tests to fail:

  • 04/71 memset_direct_rc
  • 18/04 no-open
  • 18/05 open-mode
  • 18/11 2if
  • 18/20 loop-close
  • 18/21 for-i
  • 18/27 open-error
  • 18/33 multi-ptr-open
TODO
  • Add (unlocked?) CI job to run tests also with fortification on Linux

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the listed command through scripts/update_suite.rb and reproduce the eight failures: 04/71 memset_direct_rc and the 18/* tests. Inspect the failure output to determine which tests need adjustment, then add a Linux CI job that enables _FORTIFY_SOURCE and -O3 and verify the regression suite passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, ruby
Domain
ci-cd, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.