skip to Main Content

SIGSEGV on simple mysql_query in C using Mariadb

I have a function that I query my database: void update_layout_database() char query[255]; MYSQL_ROW row; float wd,ht; sprintf(query,"SELECT name,wd,ht FROM pagelayouts WHERE drawing=%s AND handle=%ld;",drawing_number,layoutID); mysql_query(sqlconnect,query); MYSQL_RES *result = mysql_store_result(sqlconnect); row=mysql_fetch_row(result); if(row!=NULL){ if(atof(row[1])==0 || atof(row[2])==0 || !strcmp(row[0],"Model")){ wd=Extents[2]-Extents[0]; ht=Extents[3]-Extents[1]; sprintf(query,"UPDATE…

VIEW QUESTION

“Can gdb segfault when checking the value of a certain address after loading a symbol file in Ubuntu?”

My environment: Linux My-PC 5.15.90.1-microsoft-standard-WSL2 x86_64 x86_64 x86_64 GNU/Linux Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS GDB-multiarch version $ gdb-multiarch -v GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1 Selected part of Makefile (Many things are ignored): AS =arm-linux-gnueabihf-as LD =arm-linux-gnueabihf-ld NM =arm-linux-gnueabihf-nm…

VIEW QUESTION
Back To Top
Search