sipush misused for view id?

19 views
Skip to first unread message

Dacong Yan

unread,
Oct 14, 2013, 11:39:26 AM10/14/13
to dare-a...@googlegroups.com
Hi,

I'm new to dare.

I'm using it to analyze the APV PDF Viewer app. For a particular findViewById() call in its AboutPDFViewActivity activity, sipush is used to prepare the view id parameter:
  sipush 32521
  istore 7
  aload_0
  iload 7
  invokevirtual cx/hell/android/pdfview/AboutPDFViewActivity/findViewById(I)Landroid/view/View;

However, the real id value should be 2131296256 (0x7F090000), not 32521 (0x00007F09). Other places in the program use ldc to load view ids, and thus do not have this problem.

My quetions:
  1) Is this a bug?
  2) How is the decision made to use either sipush or ldc?

Thanks,
Tony

Dalvik Retargeting (Dare)

unread,
Oct 15, 2013, 12:09:33 AM10/15/13
to dare-a...@googlegroups.com
Hello Tony,

Thank you for reporting that issue. The decision to use sipush, bipush, iconst or ldc is made based on the value of the integer. The problem was due to the fact that for a specific instruction (const/high16), the decision was made based on the value before zero extension on the right.

I have committed a fix to the Github repository for Dare, the next version will have this fix.

Thanks,
Damien


--
You received this message because you are subscribed to the Google Groups "dare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dare-android...@googlegroups.com.
To post to this group, send email to dare-a...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dare-android/33046377-b8bf-4ab4-98e3-b300bdad2f08%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages