Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
How to disable stack canaries for specific functions?

With gcc, is it possible to compile with -fstack-protector, but omit for a specific function.

For example, say i have two functions.

void a() {
  ...
}

void b() {
  ...
}

Can I tell the compiler to compile a program that will use a canary before the saved return address of a, but no canary for b?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You'd have to test if it works (inspect the generated code at Godbolt) but it looks like you can do, for example:

__attribute__ ((no_stack_protector)) void foo () { ... }

no_sanitize looks like an intriguing option, I wonder who uses that.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!