aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_ranges.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-01-11 15:56:29 +0100
committerRickard Green <[email protected]>2018-01-11 15:56:29 +0100
commit45c0938066e151112f7ac3d961d9300693004b48 (patch)
tree240dfc2df3e49bd43aab61c4c52df315732d633e /erts/emulator/beam/beam_ranges.c
parenta5b047d1da2169f55f554e342ab5beca7931c820 (diff)
parentc73337fa1d95f4da5e3c702d0346130f7e0b5aac (diff)
downloadotp-45c0938066e151112f7ac3d961d9300693004b48.tar.gz
otp-45c0938066e151112f7ac3d961d9300693004b48.tar.bz2
otp-45c0938066e151112f7ac3d961d9300693004b48.zip
Merge branch 'maint'
* maint: 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 01bda7f3c1..f0c9496341 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 {