{"action":"created","issue":{"url":"https://api.github.com/repos/rainers/cv2pdb/issues/8","labels_url":"https://api.github.com/repos/rainers/cv2pdb/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/rainers/cv2pdb/issues/8/comments","events_url":"https://api.github.com/repos/rainers/cv2pdb/issues/8/events","html_url":"https://github.com/rainers/cv2pdb/issues/8","id":105177056,"number":8,"title":"crash when openmp is used (null pointer in typedef name)","user":{"login":"l0calh05t","id":1749069,"avatar_url":"https://avatars.githubusercontent.com/u/1749069?v=3","gravatar_id":"","url":"https://api.github.com/users/l0calh05t","html_url":"https://github.com/l0calh05t","followers_url":"https://api.github.com/users/l0calh05t/followers","following_url":"https://api.github.com/users/l0calh05t/following{/other_user}","gists_url":"https://api.github.com/users/l0calh05t/gists{/gist_id}","starred_url":"https://api.github.com/users/l0calh05t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l0calh05t/subscriptions","organizations_url":"https://api.github.com/users/l0calh05t/orgs","repos_url":"https://api.github.com/users/l0calh05t/repos","events_url":"https://api.github.com/users/l0calh05t/events{/privacy}","received_events_url":"https://api.github.com/users/l0calh05t/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-07T09:00:09Z","updated_at":"2015-09-07T18:22:54Z","closed_at":null,"body":"I am using cv2pdb to convert DLLs generated with MinGW-w64 from DWARF to PDB. I recently started using OpenMP in that project. This causes cv2pdb to crash because now `addUdtSymbol` is being called with a `null` name from `CV2PDB::createTypes`, more specifically in these lines:\r\n```\r\ncase DW_TAG_typedef:\r\n\tcvtype = appendModifierType(getTypeByDWARFPtr(cu, id.type), 0);\r\n\taddUdtSymbol(cvtype, id.name);\r\n```\r\n\r\nFor now I just added `if(!name) return false;` to the beginning of `CV2PDB::addUdtSymbol`.\r\n\r\nMinimal example:\r\n\r\nAdd the following to a new file, e.g., `cv2pdb_crash.cpp`:\r\n```\r\n__declspec(dllexport) void foo(int I)\r\n{\r\n\t#pragma omp parallel for\r\n\tfor(int i = 0; i < I; i++)\r\n\t\tcontinue;\r\n}\r\n```\r\n\r\nBuild a DLL:\r\n`g++ -fopenmp -O0 -g -shared  cv2pdb_crash.cpp -o cv2pdb_crash.dll`\r\n\r\nRun `cv2pdb`:\r\n`cv2pdb -C cv2pdb_crash.dll`\r\n\r\nObserve crash."},"comment":{"url":"https://api.github.com/repos/rainers/cv2pdb/issues/comments/138352151","html_url":"https://github.com/rainers/cv2pdb/issues/8#issuecomment-138352151","issue_url":"https://api.github.com/repos/rainers/cv2pdb/issues/8","id":138352151,"user":{"login":"rainers","id":702284,"avatar_url":"https://avatars.githubusercontent.com/u/702284?v=3","gravatar_id":"","url":"https://api.github.com/users/rainers","html_url":"https://github.com/rainers","followers_url":"https://api.github.com/users/rainers/followers","following_url":"https://api.github.com/users/rainers/following{/other_user}","gists_url":"https://api.github.com/users/rainers/gists{/gist_id}","starred_url":"https://api.github.com/users/rainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainers/subscriptions","organizations_url":"https://api.github.com/users/rainers/orgs","repos_url":"https://api.github.com/users/rainers/repos","events_url":"https://api.github.com/users/rainers/events{/privacy}","received_events_url":"https://api.github.com/users/rainers/received_events","type":"User","site_admin":false},"created_at":"2015-09-07T18:22:54Z","updated_at":"2015-09-07T18:22:54Z","body":"Thanks for the report.\r\n\r\nIt's probably better to allow adding these \"anonymous\" UDT. IIRC the types referred to don't work properly in the debugger if there are no corresponding UDT entries.\r\n\r\nI have pushed an appropriate patch to master."}}