-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q: How to test correctness of patches against asm files #16
Comments
There is an existing test ( To check PIC code, make sure the code you are testing is in a shared library. To check non-PIC more, use static linking. I suggest that you always write PIC code, it's easier to have one version. |
The test doesn’t help, as its scope seems to be a speed test, not a test for the correctness of the transformations. No, we cannot always write PIC code, because the environment may be not a shared library or PIE binary (it can even be a nōn-ELF binary, although I only added ELF PIC for now). I am fairly certain that the changed code will, at the very least, not crash; I just wonder about the correctness. (Especially as I discovered several pieces in the code that can be optimised further, but I stuck with mechanical transformations to enable ELF PIC for now.) You can inspect my preliminary patches (uploaded to Debian “experimental” for actual user testing) here: |
There is no way to avoid having a test if correctness needs to be checked. Maybe @jsorg71 has some tests, he is the code author. If not, maybe there is a description of the functions somewhere? |
Can you provide some context what issue you are trying to fix? What OSes/distros/configurations are affected? |
I’m fixing that the assembly code cannot be used in PIC (such as |
So, it should not affect the current xrdp builds, as they use the static library. Once the shared library is used, it would be a problem. As for xorgxrdp, it would be affected now, as it's compiled to modules. Is that how you see the issue? But the way, there is non-assembly fallback for all functions. You can use it to understand the expected functionality. |
No, current xrdp builds are also affected since GCC now defaults to PIE. I know about the non-assembly fallback (it’s used on all other architectures, like x32, anyway), but that doesn’t mean I understand that code. |
Should I add a sanity check encode of one tile for test? |
Maybe a bitmap file could be added to the repository. Then rfxcodectest could be used to encode the bitmap. The checksum of the result could be compared to the expected checksum. |
I added rfxencode with #21 |
I would rather have a small dataset that would cover most issues addressed in the code. We could use the same image converted to different color depths and different dimensions. |
Hi,
I’ll need to patch the following files…
… in order to make them usable when compiled with PIC (shared library) or PIE (relocatable binary using PIC mechanism) without having a TEXTREL (which has bad security implications).
For this, I’ll require use of the
ebx
register (which stores the address of the GOT (global object table) with PIC code on i386), so I have to rewrite part of the code. How can I test correctness of my changes (in both (ELF) PIC and nōn-PIC modes) afterwards?The text was updated successfully, but these errors were encountered: