Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6128615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:38:48+00:00 2026-05-23T16:38:48+00:00

This line is causing segfault to me: 30 printf(st_name:\t%s\n, &p_str_tab[p->st_name]); I’ve tried to trace

  • 0

This line is causing segfault to me:

30              printf("st_name:\t%s\n", &p_str_tab[p->st_name]);

I’ve tried to trace it down in gdb:

(gdb) p p_str_tab[p->st_name]
$11 = 0 '\000'
(gdb) p &p_str_tab[p->st_name]
$12 = 0x2aaaaaab0000 ""
(gdb) x/16s 0x2aaaaaab0000
0x2aaaaaab0000:  ""
0x2aaaaaab0001:  ".symtab"
0x2aaaaaab0009:  ".strtab"
(gdb) call printf("st_name:\t%s\n", 0x2aaaaaab0000)

Program received signal SIGSEGV, Segmentation fault.
0x00000034f4042729 in vfprintf () from /lib64/libc.so.6
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function

I can print the memory with gdb’s x command ,but if I use printf,segmentation fault.

Why?

UPDATE as required in comment:

(gdb) x/1i $rip 
0x34f4042729 <vfprintf+57>: mov    0xc0(%rdi),%eax
(gdb) info reg 
rax            0x54 84
rbx            0x34f3e1bbc0 227429956544
rcx            0x0  0
rdx            0xffffffffffffffb0   -80
rsi            0x401b08 4201224
rdi            0x600908 6293768
rbp            0x7fffffffe6e0   0x7fffffffe6e0
rsp            0x7fffffffe040   0x7fffffffe040
r8             0x2aaaaaabf210   46912496202256
r9             0x34f4351780 227435419520
r10            0x1238   4664
r11            0x648    1608
r12            0x0  0
r13            0x7fffffffe9c0   140737488349632
r14            0x0  0
r15            0x0  0
rip            0x34f4042729 0x34f4042729 <vfprintf+57>
eflags         0x10202  [ IF RF ]
cs             0x33 51
ss             0x2b 43
ds             0x0  0
es             0x0  0
fs             0x0  0
gs             0x0  0
fctrl          0x37f    895
fstat          0x0  0
ftag           0xffff   65535
---Type <return> to continue, or q <return> to quit---
fiseg          0x0  0
fioff          0x0  0
foseg          0x0  0
fooff          0x0  0
fop            0x0  0
mxcsr          0x1f80   [ IM DM ZM OM UM PM ]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:38:49+00:00Added an answer on May 23, 2026 at 4:38 pm

    Must be a pointer overran issue ,try valgrind.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I THINK this line is causing a 3.5K Byte memory leak, any ideas why?
This line is causing me some problems in an MVC app i'm developing <%=
Building on 1.6 SDK4 InputStream is = Resources.getSystem().openRawResource(R.raw.vortexrules); This line is causing me no
I've noticed that this line is causing problem NSManagedObject *newContact = [NSEntityDescription insertNewObjectForEntityForName:@Contacts inManagedObjectContext:context];
This line in YUI's Reset CSS is causing trouble for me: address,caption,cite,code,dfn,em,strong,th,var { font-style:
This line of code ((Matches)Container.DataItem).MatchID works in C# but in VB.NET, when used in
this line of the code makes the form see-through User32Wrappers.SetLayeredWindowAttributes(Me.Handle, 0, _ 255 *
This line is giving error: Too few arguments. What is the problem? $InsertQuery =
This line of code is a snippet from my select statement. frdFreedays - DateDiff(dd,conReceiptToStock,GetDate())
this line renews the captcha image, it should clear the inputbox 'captcha' aswell. <div

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.