aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2010-01-30Update copyright headerBjörn Gustavsson
2010-01-30Merge branch 'ta/ensure_dir_eexist' into ccase/r13b04_devErlang/OTP
* ta/ensure_dir_eexist: filelib_SUITE: strenghten tests of filelib:ensure_dir/1 Don't return a false {error,eexist} in filelib:ensure_dir/1 OTP-8389 Because of a race condition, using filelib:ensure_dir/1 from multiple processes to create the same path or parts of the same directory structure, filelib:ensure_dir/1 could return a meaningless {error,eexist}. That race condition has been eliminated, and {error,eexist} will now be returned only if there exists a regular file, device file, or some other non-directory file with the same name. (Thanks to Tuncer Ayaz.)
2010-01-30Merge branch 'mp/hipe-smp-fixes' into ccase/r13b04_devErlang/OTP
* mp/hipe-smp-fixes: work around hipe_mfa_info_table lock omission fix hipe loader SMP non-atomicity error OTP-8397 The loading of native code was not properly atomic in the SMP emulator, which could cause crashes. Also a per-MFA information table for the native code has now been protected with a lock since it turns that it could be accessed concurrently in the SMP emulator. (Thanks to Mikael Pettersson.)
2010-01-29OTP-8343 The documentation is now possible to build in an open sourceLars G Thorsen
environment after a number of bugs are fixed and some features are added in the documentation build process. - The arity calculation is updated. - The module prefix used in the function names for bif's are removed in the generated links so the links will look like "http://www.erlang.org/doc/man/erlang.html#append_element-2" instead of "http://www.erlang.org/doc/man/erlang.html#erlang:append_element- 2". - Enhanced the menu positioning in the html documentation when a new page is loaded. - A number of corrections in the generation of man pages (thanks to Sergei Golovan) - The legal notice is taken from the xml book file so OTP's build process can be used for non OTP applications.
2010-01-27work around hipe_mfa_info_table lock omissionMikael Pettersson
HiPE maintains per-MFA information such as native code entry point in a table. This table was thought to be read-only at runtime, except when the loader populates it, so it employed no locking. That turned out to be incorrect: if there is an apply of a previously unseen MFA, a native code stub for that MFA is created and recorded in the table, causing it to grow. Work around this for now by slapping a mutex around accesses to that table. Signed-off-by: Mikael Pettersson <[email protected]>
2010-01-27fix hipe loader SMP non-atomicity errorMikael Pettersson
Loading native code is a multi-step operation that needs to be atomic, but the HiPE loader failed to ensure that. This caused corruption of runtime system structure in some cases. Fix by blocking multi_scheduling around main loader entry points. Signed-off-by: Mikael Pettersson <[email protected]>
2010-01-27Update preloaded filesBjörn Gustavsson
2010-01-27Merge branch 'rb/stdlib_re_unicode_fixes' into ccase/r13b04_devErlang/OTP
* rb/stdlib_re_unicode_fixes: Fix lost unicode option in re:compile() Refactor out repeated block in re module Fix re:replace/4 to handle unicode charlist Replacement argument Fix re:replace/4 to handle unicode charlist RE argument Fix re:replace/4 to handle binary unicode output when nothing replaced OTP-8394 A number of bugs concerning re and unicode are corrected: - re:compile no longer loses unicode option, which also fixes bug in re:split. - re:replace now handles unicode charlist replacement argument - re:replace now handles unicode RE charlist argument correctly - re:replace now handles binary unicode output correctly when nothing is replaced. Most code, testcases and error isolation done by Rory Byrne.
2010-01-27Fix lost unicode option in re:compile()Patrik Nyblom
Noticed-by: Rory Byrne
2010-01-27Refactor out repeated block in re moduleRory Byrne
2010-01-27Fix re:replace/4 to handle unicode charlist Replacement argumentRory Byrne
A bug in re:replace/4 causes a badarg exception to be thrown when the Replacement argument is a charlist containing non-ascii codepoints. The problem is that the code incorrectly assumes that the Replacement text is iodata() and calls iolist_to_binary/1 on it. This patch fixes it to obey the 'unicode' option and handle charlist() Replacement arguments correctly.
2010-01-27Fix re:replace/4 to handle unicode charlist RE argumentPatrik Nyblom
The real problem is in the re:run/3 BIF. Noticed-by: Rory Byrne Tests-by: Rory Byrne
2010-01-27Fix re:replace/4 to handle binary unicode output when nothing replacedRory Byrne
A bug with re:replace/4 causes an exception when: (a) it's given a unicode charlist as input; (b) it's set to {return,binary}; and (c) it finds nothing to replace. The problem is: when re:replace/4 does not find anything to replace in its Subject input, it calls iolist_to_binary on this data. This fails if the original input is a charlist with non-ascii codepoints.
2010-01-27OTP-8387 Explicit top directories in archive files are now optional.Håkan Mattsson
For example, if an archive (app-vsn.ez) just contains an app-vsn/ebin/mod.beam file, the file info for the app-vsn and app-vsn/ebin directories are faked using the file info from the archive file as origin. The virtual direcories can also be listed. For short, the top directories are virtual if they does not exist.
2010-01-27Added a small timeout to take care of race in newshell. Also removed ↵Patrik Nyblom
deletion of files when compiled with debug option. Changed LC_CTYPE for sunos of certain versions.
2010-01-26OTP-8343 The documentation is now possible to build in an open sourceLars G Thorsen
environment after a number of bugs are fixed and some features are added in the documentation build process. - The arity calculation is updated. - The module prefix used in the function names for bif's are removed in the generated links so the links will look like http://www.erlang.org/doc/man/erlang.html#append_element-2 instead of http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2 - Enhanced the menu positioning in the html documentation when a new page is loaded. - A number of corrections in the generation of man pages (thanks to Sergei Golovan) - Moved some man pages to more apropriate sections, pages in section 4 moved to 5 and pages in 6 moved to 7. - The legal notice is taken from the xml book file so OTP's build process can be used for non OTP applications.
2010-01-25Test that "extra" is handled according to specs in ALIVE2_REQ and PORT2_RESPKlas Johansson
2010-01-25Merge branch 'ta/os_timestamp_no_mutex' into ccase/r13b04_devErlang/OTP
* ta/os_timestamp_no_mutex: Remove mutex lock around sys_gettimeofday() in os:timestamp/0 OTP-8390 An unecessary lock operation in os:timestamp/0 has been eliminated, making it slightly more efficient. (Thanks to Jonas Falkevik and Tuncer Ayaz.)
2010-01-25OTP-8377 ETS bug causing the memory counter from ets:info forSverker Eriksson
ordered_set's to sometimes get out of synch and absurdly high.
2010-01-23filelib_SUITE: strenghten tests of filelib:ensure_dir/1Björn Gustavsson
Test that filelib:ensure_dir/1 returns {error,eexist} if there already exists a regular file with the name as a directory that should be created. While at it, slightly strenghten the otp_5960/1 test case by repeating each call to filelib:ensure_dir/1.
2010-01-23Remove mutex lock around sys_gettimeofday() in os:timestamp/0Tuncer Ayaz
In the erlang-questions thread "os:timestamp() uses mutex lock" Jonas Falkevik questioned the need for a mutex lock in os:timestamp/0. The mutex lock *is* needed in erlang:now() to guarantee the uniqueness of the returned time, but serves no useful purpose in os:timestamp(). Signed-off-by: Tuncer Ayaz <[email protected]>
2010-01-22OTP-8386 Immediately repeated multi-scheduling block/unblock cycles usingRickard Green
erlang:system_flag(multi_scheduling, block | unblock) could deadlock the runtime system.
2010-01-22Merge branch 'bg/avoid-etop-in-include' into ccase/r13b04_devErlang/OTP
* bg/avoid-etop-in-include: epmd tests: fix build of test suites on Windows system test: fix build of test suites on Windows
2010-01-21Merge branch 'bg/public_key-include_lib' into ccase/r13b04_devErlang/OTP
* bg/public_key-include_lib: public_key: fix build of test suites on Windows
2010-01-21** Empty commit message **Lars G Thorsen
2010-01-20epmd tests: fix build of test suites on WindowsBjörn Gustavsson
On Windows, the ERL_TOP environment variable contains a path that only is valid for cygwin-enabled programs, such as 'make'. It is not meaningful to pass the value of $ERL_TOP in the -I option to the Erlang compiler, because the Erlang emulator does not interpret cygwin paths correctly. Therefore, -include("test_server.hrl") will fail to find test_server.hrl. Work around the problem by creating an Emakefile and let ts:run() take care of the build (ts:run() will set up the include path so that test_server.hrl can be found).
2010-01-20OTP-8375 A bug causing memory corruption in re:run() has been corrected.Patrik Nyblom
(Thanks to Yamashina Hio.)
2010-01-20Test case fixesDan Gudmundsson
2010-01-20Increased timeout for slow virtual machinesDan Gudmundsson
2010-01-20system test: fix build of test suites on WindowsBjörn Gustavsson
On Windows, the ERL_TOP environment variable contains a path that only is valid for cygwin-enabled programs, such as 'make'. It is not meaningful to pass the value of $ERL_TOP in the -I option to the Erlang compiler, because the Erlang emulator does not interpret cygwin paths correctly. Therefore, -include("test_server.hrl") will fail to find test_server.hrl. Work around the problem by using -include_lib().
2010-01-20Merge branch 'uw/shell-tab-completion' into ccase/r13b04_devErlang/OTP
* uw/shell-tab-completion: Shell tab completion now works for quoted module and function names OTP-8383 Shell tab completion now works for quoted module and function names. (Thanks to Ulf Wiger.)
2010-01-20Merge branch 'cf/compile_warning_as_error' into ccase/r13b04_devErlang/OTP
* cf/compile_warning_as_error: Add option -Werror in erlc(1) compile: add flag warnings_as_errors to treat warnings as errors compile.erl: remove trailing whitespace OTP-8382 The -Werror option for erlc and the compiler option warnings_as_errors will cause warnings to be treated as errors. (Thanks to Christopher Faulet.)
2010-01-19OTP-8016 [httpc] Several more or less critical fixes: * Initial callMicael Karlberg
between the httpc manager and request handler was synchronous. When the manager starts a new request handler, this is no longer a synchronous operation. Previously, the new request handler made the connection to the server and issuing of the first request (the reason for starting it) in the gen_server init function. If the connection for some reason "took some time", the manager hanged, leaving all other activities by that manager also hanging. As a side-effect of these changes, some modules was also renamed, and a new api module, httpc, has been introduced (the old module, http, is *not* removed, but is now just wrapper for httpc).
2010-01-19OTP-8016, OTP-8056, OTP-8103, OTP-8106, OTP-8312, OTP-8315, OTP-8327,Micael Karlberg
OTP-8349, OTP-8351, OTP-8352, OTP-8359 & OTP-8371.
2010-01-19public_key: fix build of test suites on WindowsBjörn Gustavsson
On Windows, the ERL_TOP environment variable contains a path that only is valid for cygwin-enabled programs, such as 'make'. It is not meaningful to pass the value of $ERL_TOP in the -I option to the Erlang compiler, because the Erlang emualator does not interpret cygwin paths correctly. Therefore, -include("test_server.hrl") will fail to find test_server.hrl. Work around the problem by using -include_lib().
2010-01-19Add option -Werror in erlc(1)Christopher Faulet
Like in gcc, this option treats warnings as errors.
2010-01-19compile: add flag warnings_as_errors to treat warnings as errorsChristopher Faulet
With this flag, warnings are treated as errors, like gcc flag '-Werror'.
2010-01-19compile.erl: remove trailing whitespaceBjörn Gustavsson
2010-01-19wx: Improved wxTreeCtrl.Dan Gudmundsson
Changed representation of wxTreeItem to be int. This saves memory, where the driver don't need to keep a reference map for every tree item. And added getFirstChild and getNextChild to wxTreeCtrl.
2010-01-19Fixed a memory reference bug which caused unexplained {badarg, Int} exits.Dan Gudmundsson
You could get a reference to another applications memory, if wx had deleted that applications memory without the drivers knowledge about it, typically memory allocated by wx and not the application using classes where wx-driver can't override the desctructors. When wx allocated new memory and got a pointer to that memory, the wx-driver detected the same pointer and forwarded the old ref to erlang.
2010-01-19OTP-8373 ERTS makefiles used to detect the use of a gcc C compiler byRickard Green
checking if CC equaled gcc. That is, the makefiles failed to detect gcc C compilers with other command line names than gcc. `configure' now substitute GCC into the makefiles. If CC is a gcc C compiler, GCC will have the value yes. (Thanks to Jean-S�bastien P�dron)
2010-01-19OTP-8342 Processes, and/or ports could get stuck on a blocked schedulerRickard Green
when erlang:system_flag(multi_scheduling, block) was used. Processes, and/or ports could get stuck on an offline scheduler when schedulers online were reduced using erlang:system_flag(schedulers_online, SchedulersOnline).
2010-01-19Add test suite for the tools applicationBjörn Gustavsson
2010-01-19Update version numbersBjörn Gustavsson
2010-01-19** Empty commit message **Dan Gudmundsson
2010-01-19Merge branch 'dgud/ssl-patches-from-Wil' into ccase/r13b04_devErlang/OTP
* dgud/ssl-patches-from-Wil: Added a public_key:pkix_transform/2 instead and used it from ssl. Minor code cleanup new_ssl fix session reuse Code cleanup Send CA list during Certificate Request in new_ssl OTP-8372 Fixed session reuse (in new_ssl), thanks Wil Tan. Send CA list during Certificate Request (in new_ssl) , thanks Wil Tan.
2010-01-19Update version numberDan Gudmundsson
2010-01-19Merge branch 'bg/compiler-beam_validator' into ccase/r13b04_devErlang/OTP
* bg/compiler-beam_validator: beam_validator: fix incorrect assumptions about GC guard BIFs OTP-8378 In rare circumstances when using garbaging collecting guard BIFs, the validation pass (beam_validator) would signal that the code was unsafe, when it in fact was correct. (Thanks to Kiran Khaladkar.)
2010-01-19Merge branch 'fh/common_test-includes' into ccase/r13b04_devErlang/OTP
* fh/common_test-includes: make it possible to include ct.hrl using include_lib Include test_servers's include files in the bootstrap OTP-8379 It is now possible to include the ct.hrl using the -include_lib directive. (Thanks to Fred Hebert.)
2010-01-18Don't return a false {error,eexist} in filelib:ensure_dir/1Tuncer Ayaz
This is about the non-atomicity of filelib:ensure_dir/1. When using filelib:ensure_dir/1 from multiple processes to create the same path or parts of the same directory structure (which happens with rebar's worker processes) it happens quite a lot that between a file:read_file_info/1 and file:make_dir/1 one of the other procs has already created the directory we want to create. mkdir(1) says one of the following for -p depending on which Unix like system you're on: "no error if existing" "no error will be reported if a directory given as an operand already exists" I've seen more than one Erlang project where the return value of ensure_dir/1 is ignored completely. To eliminate the race condition, call file:make_dir/1 without first testing whether the directory exists. If it succeeds everything is fine. Otherwise, if the error code is {error,eexists}, check whether the directory exists. If it does, everything is fine; if not, return {error,eexist} (which indicates that there exists a regular file with the same name, or (more unlikely) that another process removed the directory after the call to file:make_dir/1). Signed-off-by: Tuncer Ayaz <[email protected]>