aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_ranges.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-12-27 19:17:37 +0100
committerRickard Green <[email protected]>2018-01-11 15:15:56 +0100
commitc3ddb0fc41efcada961920a26f5286f12793614e (patch)
tree3a513f46b75375d66b20edfdb10e7a29ec69c6b1 /erts/emulator/beam/beam_ranges.c
parent194513197e19cd592f3f5c2231510542f5193fe4 (diff)
downloadotp-c3ddb0fc41efcada961920a26f5286f12793614e.tar.gz
otp-c3ddb0fc41efcada961920a26f5286f12793614e.tar.bz2
otp-c3ddb0fc41efcada961920a26f5286f12793614e.zip
Fix encoding of filenames in stacktraces
Diffstat (limited to 'erts/emulator/beam/beam_ranges.c')
-rw-r--r--erts/emulator/beam/beam_ranges.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/beam_ranges.c b/erts/emulator/beam/beam_ranges.c
index fac4289271..c7b17d58f3 100644
--- a/erts/emulator/beam/beam_ranges.c
+++ b/erts/emulator/beam/beam_ranges.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2012-2016. All Rights Reserved.
+ * Copyright Ericsson AB 2012-2018. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
#include "erl_vm.h"
#include "global.h"
#include "beam_load.h"
+#include "erl_unicode.h"
typedef struct {
BeamInstr* start; /* Pointer to start of module. */
@@ -341,8 +342,7 @@ lookup_loc(FunctionInfo* fi, const BeamInstr* pc,
Atom* mod_atom = atom_tab(atom_val(fi->mfa->module));
fi->needed += 2*(mod_atom->len+4);
} else {
- Atom* ap = atom_tab(atom_val((fi->fname_ptr)[file-1]));
- fi->needed += 2*ap->len;
+ fi->needed += 2*erts_atom_to_string_length((fi->fname_ptr)[file-1]);
}
return;
} else {