classroom-resources / classroom-resources/autograding-example-cpp
catch errors
- Lingua principale
- C++
- Stelle
- 13
- Fork
- 23
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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"
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con l’esecuzione di education/autograding@v1 e con il comando del Makefile che compila hello.cpp, quindi esamina catch.hpp in prossimità degli errori segnalati sigStackSize e altStackMem. Confronta l’ambiente del compilatore dell’autograder con l’esecuzione in Codespaces e verifica il completamento quando l’esempio viene compilato e le cinque assertions hanno esito positivo nell’autograder.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, github-actions
- Ambito
- ci-cd, testing
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100