!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/home/scripts/pba/phc-read-only/src/optimize/   drwxrwxr-x
Free 83.21 GB of 96.73 GB (86.02%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Misc_annotations.cpp (3.14 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 * phc -- the open source PHP compiler
 * See doc/license/README.license for licensing information
 *
 * Do miscellaneous annotations for optimizations - simple cases which involve
 * checking the Optimization Oracle, and do not require analysis.
 *
 
 *
 */

#include "Misc_annotations.h"
#include "Oracle.h"
#include "Def_use_web.h"

using namespace MIR;

// visit_expr needs to be called manually
void
Misc_annotations::visit_assign_var (Statement_block* bb, MIR::Assign_var* in)
{
    visit_expr (bb, in->rhs);
}

void
Misc_annotations::visit_eval_expr (Statement_block* bb, MIR::Eval_expr* in)
{
    visit_expr (bb, in->expr);
}

/* Mark actual parameters to function calls as being by-reference, or not
 * by-reference, if we know this to be the case. We should know in all cases
 * except:
 *        OO (we might know with type-inference)
 *        varaible-function calls
 *        dynamic function definition
 */
void
mark_by_ref (Method_invocation* in)
{
    // TODO: handle methods and static methods
    if (in->target)
        return;

    if (isa<MIR::Variable_method> (in->method_name))
        return;

  phc_optimization_exception ("Optimizing by marking known references is not supported");
/*    Signature* sig = Oracle::get_signature (dyc<METHOD_NAME> (in->method_name));
    if (sig == NULL)
    {
        phc_missed_opt ("Signature not available", in, "%s");
        return;
    }

    CTS ("resolve-by-ref");
    int i = 0;
    foreach (Actual_parameter* ap, *in->actual_parameters)
    {
        if (ap->is_ref || sig->is_param_passed_by_ref (i))
            ap->rvalue->attrs->set_true ("phc.optimize.param_by_ref");
        else
            ap->rvalue->attrs->set_true ("phc.optimize.param_not_by_ref");

        i++;
    }
    */
}

void
mark_zend_reference_bug (Method_invocation* in)
{
    // Mark the special case of the function returning by reference and the
    // called function being a ZEND_FUNCTION_CALL.
    if (in->target)
        return;

    if (isa<MIR::Variable_method> (in->method_name))
        return;

  phc_optimization_exception ("Optimizing by marking the zend reference bug is not supported");
/*
    // Any function for which we have a signature is a ZEND_FUNCTION_CALL
    Signature* sig = Oracle::get_signature (dyc<METHOD_NAME> (in->method_name));
    if (sig == NULL)
        return;


    CTS ("resolve-return-by-ref");
    if (sig->return_by_ref)
        in->attrs->set_true ("phc.optimize.return_reference_bug");
    else
        in->attrs->set_true ("phc.optimize.no_return_reference_bug");
*/

}

void
Misc_annotations::visit_method_invocation (Statement_block* bb, MIR::Method_invocation* in)
{
    mark_by_ref (in);
    mark_zend_reference_bug (in);
}

/*
 * Mark variables which cannot be references
 */
void
Misc_annotations::annotate_non_by_ref_vars (Basic_block* bb)
{
//    Alias_name_list* names = new Alias_name_list;
  phc_optimization_exception ("Optimizing by annotating the non-reference variables is not supported");
//    names->push_back_all (bb->cfg->duw->get_block_defs (bb));
//    names->push_back_all (bb->cfg->duw->get_block_uses (bb));
//    foreach (Alias_name* name, *names)
//    {
/*
        phc_TODO ();
        if (!aliasing->aliases->has (var))
        {
            CTS ("resolve-non-ref");
            var->attrs->set_true ("phc.optimize.cannot_be_ref");
        }*/
//    }
}

void
Misc_annotations::visit_basic_block (Basic_block* bb)
{
    annotate_non_by_ref_vars (bb);
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by HackingTool | HackingTool | Generation time: 0.0041 ]--