public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: tturhan@cs.bilkent.edu.tr
To: gcc@gcc.gnu.org
Subject: Error Injection
Date: Sun, 01 Sep 2013 11:45:00 -0000	[thread overview]
Message-ID: <a5bc2c674019c3bdf17717f24afebfe5.squirrel@newmail.bilkent.edu.tr> (raw)

Hi,

I am a student at Bilkent Uni. in Turkey and using GCC as a tool for my
M.S. Thesis which is about Software Fault Tolerance.
I am stuck, in terms of implementing bit flips in the operands of a gimple
statement.

I need to inject bit flips to all kinds of operands, constant integers,
floats, variables, pointers etc...

It is simpler for constants, but I am having a hard time to get the value
of pointers and other variables.

My objective is to simply change the value of a tree operand, by injecting
a new instruction that changes the value or directly change the operand to
a bit flipped value.

For constant integers I did something like this:

int valueBefore = TREE_INT_CST_LOW(operands[i]);
int valueAfter = (valueBefore ^ (1u << 2)); 					tree number =
build_int_cst (integer_type_node, valueAfter);

I would love it if you can help me and
may even implement a tool for GCC for error injection purposes.

Any help would be much appreciated!

Thank you very much!

             reply	other threads:[~2013-09-01 11:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-01 11:45 tturhan [this message]
2013-09-03 17:59 ` Modifying the values of Gimple Instruction Operands tturhan
2013-09-04  8:18   ` Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a5bc2c674019c3bdf17717f24afebfe5.squirrel@newmail.bilkent.edu.tr \
    --to=tturhan@cs.bilkent.edu.tr \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).