You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I faced problem which solved in 9c26038
Yara rules compiled by yara64.exe don't work with yara32.exe.
I saw the problem was solved by addition field 'uint32_t unused;', but I think it is non-persistent soltuion. Adding one more uint32_t raise the probem again
It work nice.
I think there were no problems before because YR_RULE contained 2 int32_t field. Adding uint32_t required_strings caues misalining in rule loading. 'uint32_t unused;' is non-persistent soltuion, because another new field also break the loading. I suggest to move YR_ALIGN(8) to try avoid same problem in future
#define DECLARE_REFERENCE(type, name) \
YR_ALIGN(8) union \
{ \
type name; \
YR_ARENA_REF name##_; \
}
The text was updated successfully, but these errors were encountered:
I faced problem which solved in 9c26038
Yara rules compiled by yara64.exe don't work with yara32.exe.
I saw the problem was solved by addition field 'uint32_t unused;', but I think it is non-persistent soltuion. Adding one more uint32_t raise the probem again
To Reproduce
yarac64.exe "D:\rules.yara" d:\rules.yarac
I obtain in debug mode rule_table is collapsed
5) Ubuntu compiled version run as expected for 32 and 64 bit both
Please complete the following information:
Additional context
I can see problem with aligment in macro
when
According microsoft documentaion https://learn.microsoft.com/en-us/cpp/cpp/align-cpp?view=msvc-170 aling command must go before struct or union declarion. For gcc
__attribute__((aligned(n)))
can be wriiten before and after both.Using YR_ALIGN everywhere except DECLARE_REFERENCE is before struct, union. For example
It work nice.
I think there were no problems before because YR_RULE contained 2 int32_t field. Adding
uint32_t required_strings
caues misalining in rule loading. 'uint32_t unused;' is non-persistent soltuion, because another new field also break the loading. I suggest to moveYR_ALIGN(8)
to try avoid same problem in futureThe text was updated successfully, but these errors were encountered: