Project

General

Profile

Actions

Bug #1732

closed

BLAST's alias analyzer doesn't propagate aliases over return-s from functions

Added by Pavel Shved over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
09/01/2011
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

BLAST calculates aliases of return as assignments of the "return value" (BLAST uses CIL transformation that makes functions have only one exit point that returns a specific value) to the recipient at caller's site.

However, it doesn't seem to correctly get the return lval of the function. Let's see the code in Alias Analyzer:

(* get the assignment for retval *)                                                                   
let returnlvalue = Expression.Lval(Expression.Symbol("__retres@"^fname)) in                           
let new_bdd_at_target = do_assignment true new_bdd_at_entry_loc retval returnlvalue in                
  new_bdd_at_target

However, the return values do not fall under this pattern. Sometimes, the special lvalues are not generated (if the function is simple), and the statements look simply as Return(p@return_self). Or, they have a number after __retres, as in Return(__retres3@main).

The relevant test (alias_of_return.c) is added to the regression test set.

Should be fixed, as it's important for seamless processing of dev_get_drvdata function.

Actions

Also available in: Atom PDF