Merge lp:~gue5t/midori/64-bit-vala-decl into lp:midori
Status: | Merged |
---|---|
Approved by: | Paweł Forysiuk |
Approved revision: | 6984 |
Merged at revision: | 7023 |
Proposed branch: | lp:~gue5t/midori/64-bit-vala-decl |
Merge into: | lp:midori |
Diff against target: |
78 lines (+27/-4) 4 files modified
CMakeLists.txt (+13/-1) midori/midori-searchaction.h (+3/-0) midori/midori-view.h (+4/-0) tests/actions.vala (+7/-3) |
To merge this branch: | bzr merge lp:~gue5t/midori/64-bit-vala-decl |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paweł Forysiuk | Approve | ||
Cris Dywan | Needs Fixing | ||
Review via email: mp+267466@code.launchpad.net |
Commit message
Ensure vala knows the prototypes of functions it calls, fixing pointer truncation in tests
Description of the change
I was getting segfaults when running the 'actions' test despite code that looked perfectly sane. When I investigated in gdb, everything looked good until the function returned--at which point the pointer was getting manged! In the disassembly, I saw a "zero-extend" instruction being used on the pointer, which made no sense. Then I realized that the function being called in Vala, 263midori_
Adding a declaration in the header stopped the segfaults. Can we get valac to ask the C compiler to disallow implicit declarations?
How about adding -Werror= implicit- function- declaration to VALA_CFLAGS in CmakeLists.txt?
It seems a little odd to me to be asserting the name of the menhu, but I'm guressing you're doing this to dare the pointer to get corrupted... so maybe a sensible resort