Skip to content

catch errors #4

@davidecavallari

Description

@davidecavallari

When I commit and push my changes, I get these weird errors:

Run education/autograding@v1
  with:
    token: ***

::stop-commands::***

📝 example


  g++ -std=c++11 hello.cpp
In file included from /usr/include/signal.h:3[2](https://github.com/ite-sia-info4/test-autograding-cpp-davidecavallari/actions/runs/6206544376/job/16850904302#step:3:2)8,
                   from catch.hpp:7955,
                   from hello.cpp:5:
  catch.hpp:107[3](https://github.com/ite-sia-info4/test-autograding-cpp-davidecavallari/actions/runs/6206544376/job/16850904302#step:3:3)5:58: error: call to non-'constexpr' function 'long int sysconf(int)'
  10735 |     static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
        |                                                          ^~~~~~~~~~~
  In file included from /usr/include/x86_6[4](https://github.com/ite-sia-info4/test-autograding-cpp-davidecavallari/actions/runs/6206544376/job/16850904302#step:3:5)-linux-gnu/bits/sigstksz.h:24,
                   from /usr/include/signal.h:328,
                   from catch.hpp:79[5](https://github.com/ite-sia-info4/test-autograding-cpp-davidecavallari/actions/runs/6206544376/job/16850904302#step:3:6)5,
                   from hello.cpp:5:
  /usr/include/unistd.h:[6](https://github.com/ite-sia-info4/test-autograding-cpp-davidecavallari/actions/runs/6206544376/job/16850904302#step:3:7)40:1[7](https://github.com/ite-sia-info4/test-autograding-cpp-davidecavallari/actions/runs/6206544376/job/16850904302#step:3:8): note: 'long int sysconf(int)' declared here
    640 | extern long int sysconf (int __name) __THROW;
        |                 ^~~~~~~
  In file included from hello.cpp:5:
  catch.hpp:107[9](https://github.com/ite-sia-info4/test-autograding-cpp-davidecavallari/actions/runs/6206544376/job/16850904302#step:3:10)4:45: error: size of array 'altStackMem' is not an integral constant-expression
  [10](https://github.com/ite-sia-info4/test-autograding-cpp-davidecavallari/actions/runs/6206544376/job/16850904302#step:3:11)794 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
        |                                             ^~~~~~~~~~~~
  make: *** [Makefile:4: a.out] Error 1
  
❌ example
::error::Error: Exit with code: 2 and signal: null

::***::
Points 0/10

even though all tests succeed in Codespaces:

===============================================================================
All tests passed (5 assertions in 2 test cases)

[1] + Done                       "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-10xiq1dj.vhy" 1>"/tmp/Microsoft-MIEngine-Out-d1d3041k.qkx"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions