microsoft / microsoft/vscode-cpptools
Stepping over std::vector<std::string> v{""} with g++-12 incorrect jumps to the end of the function
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
Environment
- OS and version: Ubuntu22
- VS Code: latest
- C/C++ extension: latest
- GDB / LLDB version: gdb 12.1 (also repros with 13).
Bug Summary and Steps to Reproduce
- Use C++ code
#include <vector>
#include <string>
int main()
{
std::vector<std::string> v{""};
return 0;
}
- Put a breakpoint on the std::vector line and use F5.
- Choose to compile with the g++-12 compiler -- it doesn't repro if you switch to g++-11.
- Step over the std::vector function.
Bug: The stepping jumps to the bottom of the function instead of going to the next line. This occurs if additional lines of code are added as well. Stepping an extra time goes to the next line (return 0).
Debugger Configurations
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++-12 build active file",
"command": "/usr/bin/g++-12",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
launch.json is the default generated with F5.
Debugger Logs
...
Other Extensions
No response
Additional Information
I didn't find this bug -- it was found by an "internal team".
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non è indicato alcun file del repository né alcun test. Riproduci il comportamento con il programma C++ fornito, g++-12, GDB 12.1 o 13, e il task di build e il launch.json predefinito mostrati; confrontalo con g++-11. Il lavoro è completato quando l'esecuzione passo-passo oltre l'inizializzazione del vettore raggiunge correttamente la riga di codice sorgente successiva.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, vscode
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100