Closed RobotSail closed 8 months ago
Even with a basic patch like this one, I still receive an error:
diff --git a/src/views.c b/src/views.c
index 78bc076..bcb3527 100644
--- a/src/views.c
+++ b/src/views.c
@@ -216,13 +216,14 @@ inline int create_diff(struct xxxid_stats_arr *cs,struct xxxid_stats_arr *ps,dou
inline void humanize_val(double *value,char *str,int allow_accum) {
const char *u="BKMGTPEZY";
size_t p=0;
+ size_t u_length = strlen(u);
if (config.f.kilobytes) {
p=1;
*value/=(double)config.f.base;
} else {
while (*value>config.f.base*config.f.threshold) {
- if (p+1<strlen(u)) {
+ if (p+1<u_length) {
*value/=(double)config.f.base;
p++;
} else
Error:
analysing for missing macros
[command] cat /dirs/iotop-c-c-patch//src/views.c |
grep '#ifdef' >
/FixMorph/output/test/tmp/result
[command] clang -E -dD -dM /dirs/iotop-c-c-
patch//src/views.c >
/FixMorph/output/test/tmp/macro-def
analysing for missing variables
analysing for missing data-types
[ERROR] Crash during evaluate code slices, after 0.007 minutes.
[ERROR] Transformation Failed
[ERROR] 'size_t'
[ERROR] Unexpected error during evaluate code slices.
[ERROR] Runtime Error
[ERROR] Error. Exiting...
Hi @RobotSail I updated the tool to use latest version of llvm/clang/python I tried your last example, and it worked for me. Can you check if it works for you as well?
Thank you so much @rshariffdeen ! I just tried the latest build and was able to get the patch generating correctly :sunglasses:
Hi all, I have yet another issue that I ran into when attempting to use the tool.
This issue occurred when attempting to work with the iotop-c project.
Here's the error output that I received from FixMorph:
Here is the patch being backported:
And here is the patch used to generate the downstream version: